[COMMAND MENU ITEMS] Disable hide label toggle for items with no short label (#19464)
<img width="824" height="1140" alt="CleanShot 2026-04-08 at 18 08 31@2x" src="https://github.com/user-attachments/assets/67989cd7-ac0f-4c28-b128-6db50abecc88" />
This commit is contained in:
+3
-1
@@ -37,6 +37,7 @@ export const CommandMenuItemOptionsDropdown = ({
|
||||
|
||||
const normalizedServerShortLabel = serverShortLabel ?? null;
|
||||
const normalizedShortLabel = shortLabel ?? null;
|
||||
const hasNoShortLabel = normalizedServerShortLabel === null;
|
||||
const isLabelHidden =
|
||||
normalizedShortLabel === null && isDefined(normalizedServerShortLabel);
|
||||
const hasShortLabelOverride =
|
||||
@@ -66,9 +67,10 @@ export const CommandMenuItemOptionsDropdown = ({
|
||||
<MenuItemToggle
|
||||
LeftIcon={IconTag}
|
||||
text={t`Hide label`}
|
||||
toggled={isLabelHidden}
|
||||
toggled={isLabelHidden || hasNoShortLabel}
|
||||
onToggleChange={handleToggleHideLabel}
|
||||
toggleSize="small"
|
||||
disabled={hasNoShortLabel}
|
||||
/>
|
||||
<MenuItem
|
||||
LeftIcon={IconRefresh}
|
||||
|
||||
Reference in New Issue
Block a user