Change menu subitem 'disabled' => 'enabled'

This commit is contained in:
Dermot Duffy
2022-05-08 16:32:54 -07:00
parent ac7572b53d
commit f917dbee75
3 changed files with 3 additions and 2 deletions
+1
View File
@@ -666,6 +666,7 @@ Parameters for the `custom:frigate-card-menu-submenu` element are identical to t
| `entity` | | An optional Home Assistant entity from which title, icon and style can be automatically computed. |
| `state_color` | `true` | Whether or not the title and icon should be stylized based on state. |
| `selected` | `false` | Whether or not to show this item as selected. |
| `enabled` | `true` | Whether or not to show this item as enabled / selectable. |
| `style` | | Position and style the element using CSS. |
| `tap_action`, `double_tap_action`, `hold_action`, `start_tap`, `end_tap` | | [Home Assistant action configuration](https://www.home-assistant.io/lovelace/actions) including the extended functionality described under [actions](#actions). |
+1 -1
View File
@@ -49,7 +49,7 @@ export class FrigateCardSubmenu extends LitElement {
?twoline=${!!item.subtitle}
?selected=${item.selected}
?activated=${item.selected}
?disabled=${!!item.disabled}
?disabled=${item.enabled === false}
aria-label="${stateParameters.title || ''}"
@action=${(ev) => {
// Attach the action config so ascendants have access to it.
+1 -1
View File
@@ -432,7 +432,7 @@ const menuSubmenuItemSchema = elementsBaseSchema.extend({
state_color: z.boolean().default(true).optional(),
selected: z.boolean().default(false).optional(),
subtitle: z.string().optional(),
disabled: z.boolean().optional(),
enabled: z.boolean().default(true).optional(),
});
export type MenuSubmenuItem = z.infer<typeof menuSubmenuItemSchema>;