Semantic-Org/Semantic-UI · error
You called a dropdown action that was not defined
Error message
You called a dropdown action that was not defined
What it means
determine.selectAction() runs when an item is selected; it matches settings.action against the built-in action map (nothing/activate/select/combo/hide) and against a custom function. If it matches neither (unknown string or wrong value type), it logs this error and the selection does nothing meaningful.
Source
Thrown at src/definitions/modules/dropdown.js:3793
onLabelRemove : function(value) { return true; },
onNoResults : function(searchTerm) { return true; },
onShow : function(){},
onHide : function(){},
/* Component */
name : 'Dropdown',
namespace : 'dropdown',
message: {
addResult : 'Add <b>{term}</b>',
count : '{count} selected',
maxSelections : 'Max {maxCount} selections',
noResults : 'No results found.',
serverError : 'There was an error contacting the server'
},
error : {
action : 'You called a dropdown action that was not defined',
alreadySetup : 'Once a select has been initialized behaviors must be called on the created ui dropdown',
labels : 'Allowing user additions currently requires the use of labels.',
missingMultiple : '<select> requires multiple property to be set to correctly preserve multiple values',
method : 'The method you called is not defined.',
noAPI : 'The API module is required to load resources remotely',
noStorage : 'Saving remote data requires session storage',
noTransition : 'This module requires ui transitions <https://github.com/Semantic-Org/UI-Transition>'
},
regExp : {
escape : /[-[\]{}()*+?.,\\^$|#\s]/g,
quote : /"/g
},
metadata : {
defaultText : 'defaultText',
defaultValue : 'defaultValue',
placeholderText : 'placeholder',View on GitHub (pinned to 597843ab84)
Solutions
- Set action to one of the known keys: 'nothing', 'activate', 'select', 'combo', 'hide', or a function (text,value,element)=>{}
- Remove the action option to use the default 'activate'
Example fix
// before
$('.ui.dropdown').dropdown({ action: 'activte' });
// after
$('.ui.dropdown').dropdown({ action: 'activate' });
// or a custom function
$('.ui.dropdown').dropdown({ action: function(text, value, el){ /* ... */ } }); Defensive patterns
Strategy: validation
Validate before calling
var KNOWN_ACTIONS = ['nothing','activate','select','combo','hide'];
function actionIsValid(a) {
return typeof a === 'function' || KNOWN_ACTIONS.indexOf(a) !== -1;
}
if (actionIsValid(myAction)) {
$('.ui.dropdown').dropdown({ action: myAction });
} else {
console.warn('dropdown: invalid action', myAction);
} Type guard
function isDropdownAction(a) {
return typeof a === 'function'
|| a === 'nothing' || a === 'activate'
|| a === 'select' || a === 'combo' || a === 'hide';
} Prevention
- Restrict action to the documented keys or a function — do not pass arbitrary strings
- Validate config objects in a shared helper before passing to .dropdown()
- Keep a TypeScript declaration merging module:'ui.dropdown' options to a strict union of action values
When it happens
Trigger: Setting action to an unknown or misspelled string such as {action:'activte'}, or a non-function value like {action:123}. The default valid action is 'activate'.
Common situations: Custom action name not present in the module.action map; typo when copying from docs; passing a value that is neither a known string-key nor a function.
Related errors
- Allowing user additions currently requires the use of labels
- API action used but no url was defined
- No URL specified
- There was an error contacting the server
- Once a select has been initialized behaviors must be called
AI-assisted analysis of Semantic-Org/Semantic-UI@597843ab84 (2026-08-13).
Data as JSON: /api/errors/829c7b2be2465342.
Report an issue: GitHub.