Semantic-Org/Semantic-UI · warning

The method you called is not defined.

Error message

The method you called is not defined.

What it means

Same invoke() pattern as the other modules: you called .dropdown('methodName') and the lookup found no matching behavior on the module object. Logged via console.error prefixed 'Dropdown:'.

Source

Thrown at src/definitions/modules/dropdown.js:3797

  /* 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',
    text            : 'text',
    value           : 'value'
  },

View on GitHub (pinned to 597843ab84)

Solutions

  1. Verify the behavior against the dropdown API: 'set selected', 'get value', 'show', 'hide', 'clear', 'destroy', etc.
  2. Use the documented dotted form exactly ('set selected', not 'setSelected')

Example fix

// before
$('select').dropdown('setSelected', 'x');
// after
$('select').dropdown('set selected', 'x');
Defensive patterns

Strategy: validation

Validate before calling

var DROPDOWN_BEHAVIORS = ['set selected','get value','get text','set value','show','hide','toggle','clear','refresh','destroy','set exactly','restore defaults','remove selected'];
function isKnownDropdownBehavior(name) {
  return DROPDOWN_BEHAVIORS.indexOf(name) !== -1;
}
if (isKnownDropdownBehavior(behavior)) {
  $('select').dropdown(behavior);
}

Type guard

function isDropdownBehavior(name) {
  return typeof name === 'string' && /^(set|get|remove|restore) [a-z]+( [a-z]+)?$|^(show|hide|toggle|clear|refresh|destroy)$/.test(name);
}

Prevention

When it happens

Trigger: Typo such as .dropdown('setSelected','x') (wrong camelCase — the API uses dotted 'set selected'), or a behavior removed/renamed in this version.

Common situations: Version skew where a method was renamed; wrong call signature; calling a private method name.

Related errors


AI-assisted analysis of Semantic-Org/Semantic-UI@597843ab84 (2026-08-13). Data as JSON: /api/errors/b346caaf17fa6251. Report an issue: GitHub.