{"record":{"id":"829c7b2be2465342","repo":"Semantic-Org/Semantic-UI","slug":"you-called-a-dropdown-action-that-was-not-defined","errorCode":null,"errorMessage":"You called a dropdown action that was not defined","messagePattern":"You called a dropdown action that was not defined","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/definitions/modules/dropdown.js","lineNumber":3793,"sourceCode":"  onLabelRemove : function(value) { return true; },\n  onNoResults   : function(searchTerm) { return true; },\n  onShow        : function(){},\n  onHide        : function(){},\n\n  /* Component */\n  name           : 'Dropdown',\n  namespace      : 'dropdown',\n\n  message: {\n    addResult     : 'Add <b>{term}</b>',\n    count         : '{count} selected',\n    maxSelections : 'Max {maxCount} selections',\n    noResults     : 'No results found.',\n    serverError   : 'There was an error contacting the server'\n  },\n\n  error : {\n    action          : 'You called a dropdown action that was not defined',\n    alreadySetup    : 'Once a select has been initialized behaviors must be called on the created ui dropdown',\n    labels          : 'Allowing user additions currently requires the use of labels.',\n    missingMultiple : '<select> requires multiple property to be set to correctly preserve multiple values',\n    method          : 'The method you called is not defined.',\n    noAPI           : 'The API module is required to load resources remotely',\n    noStorage       : 'Saving remote data requires session storage',\n    noTransition    : 'This module requires ui transitions <https://github.com/Semantic-Org/UI-Transition>'\n  },\n\n  regExp : {\n    escape   : /[-[\\]{}()*+?.,\\\\^$|#\\s]/g,\n    quote    : /\"/g\n  },\n\n  metadata : {\n    defaultText     : 'defaultText',\n    defaultValue    : 'defaultValue',\n    placeholderText : 'placeholder',","sourceCodeStart":3775,"sourceCodeEnd":3811,"githubUrl":"https://github.com/Semantic-Org/Semantic-UI/blob/597843ab84d565cccfd8fd7719416350ae73e734/src/definitions/modules/dropdown.js#L3775-L3811","documentation":"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.","triggerScenarios":"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'.","commonSituations":"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.","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'"],"exampleFix":"// before\n$('.ui.dropdown').dropdown({ action: 'activte' });\n// after\n$('.ui.dropdown').dropdown({ action: 'activate' });\n// or a custom function\n$('.ui.dropdown').dropdown({ action: function(text, value, el){ /* ... */ } });","handlingStrategy":"validation","validationCode":"var KNOWN_ACTIONS = ['nothing','activate','select','combo','hide'];\nfunction actionIsValid(a) {\n  return typeof a === 'function' || KNOWN_ACTIONS.indexOf(a) !== -1;\n}\nif (actionIsValid(myAction)) {\n  $('.ui.dropdown').dropdown({ action: myAction });\n} else {\n  console.warn('dropdown: invalid action', myAction);\n}","typeGuard":"function isDropdownAction(a) {\n  return typeof a === 'function'\n    || a === 'nothing' || a === 'activate'\n    || a === 'select'   || a === 'combo' || a === 'hide';\n}","tryCatchPattern":null,"preventionTips":["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"],"tags":["dropdown","semantic-ui","config","action"],"backgroundTag":null,"analyzedSha":"597843ab84d565cccfd8fd7719416350ae73e734","analyzedAt":"2026-08-13T01:44:23.827Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}