Semantic-Org/Semantic-UI · warning
Allowing user additions currently requires the use of labels
Error message
Allowing user additions currently requires the use of labels.
What it means
restore.labels() runs during init/restore; if allowAdditions is true but useLabels is false, the combination is unsupported. The module logs this error and forcibly sets useLabels=true, so the dropdown keeps working but always in label mode.
Source
Thrown at src/definitions/modules/dropdown.js:3795
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',
text : 'text',
value : 'value'View on GitHub (pinned to 597843ab84)
Solutions
- Keep useLabels:true (the default) whenever allowAdditions:true
- If you need useLabels:false, set allowAdditions:false
Example fix
// before
$('.ui.dropdown').dropdown({ allowAdditions: true, useLabels: false });
// after
$('.ui.dropdown').dropdown({ allowAdditions: true, useLabels: true }); Defensive patterns
Strategy: validation
Validate before calling
function validDropdownConfig(cfg) {
cfg = cfg || {};
if (cfg.allowAdditions === true && cfg.useLabels === false) {
throw new Error('allowAdditions:true requires useLabels:true');
}
return cfg;
}
$('.ui.dropdown').dropdown(validDropdownConfig({ allowAdditions: true, useLabels: false })); Type guard
function isConsistentDropdownConfig(c) {
return !(c && c.allowAdditions === true && c.useLabels === false);
} Prevention
- Never combine allowAdditions:true with useLabels:false — pick one mode
- Centralize dropdown option construction in a factory that asserts the invariant
- Document the chosen multiselect mode in your component wrapper
When it happens
Trigger: Configuring the incompatible pair { allowAdditions: true, useLabels: false } — you asked for free-text user additions but disabled the label rendering that additions require.
Common situations: Wanting a comma-delimited multiselect (useLabels:false) together with allowAdditions:true; these are mutually exclusive in this version.
Related errors
- You called a dropdown action that was not defined
- No URL specified
- There was an error contacting the server
- Once a select has been initialized behaviors must be called
- <select> requires multiple property to be set to correctly p
AI-assisted analysis of Semantic-Org/Semantic-UI@597843ab84 (2026-08-13).
Data as JSON: /api/errors/ee6d080bcd6149ad.
Report an issue: GitHub.