diff --git a/addons/knobs/src/components/Panel.js b/addons/knobs/src/components/Panel.js index 818aaee40e7e..8e7802e5557f 100644 --- a/addons/knobs/src/components/Panel.js +++ b/addons/knobs/src/components/Panel.js @@ -196,9 +196,11 @@ export default class KnobPanel extends PureComponent { ); } - // Always sort 'Other' (ungrouped) tab last without changing the remaining tabs - const entries = Object.entries(groups).filter(entry => entry[0] !== 'Other'); - entries.push(Object.entries(groups).find(entry => entry[0] === 'Other')); + // Always sort DEFAULT_GROUP_ID (ungrouped) tab last without changing the remaining tabs + const unsortedEntries = Object.entries(groups); + const entries = unsortedEntries + .filter(entry => entry[0] !== DEFAULT_GROUP_ID) + .push(unsortedEntries.find(entry => entry[0] === DEFAULT_GROUP_ID)); return (