Fix default action config on menu selection.
This commit is contained in:
+5
-1
@@ -514,5 +514,9 @@ export const frigateCardHandleAction = (
|
|||||||
},
|
},
|
||||||
action: string,
|
action: string,
|
||||||
): void => {
|
): void => {
|
||||||
handleActionConfig(node, hass, config, getActionConfigGivenAction(action, config));
|
const actionConfig = getActionConfigGivenAction(action, config);
|
||||||
|
if (actionConfig || action == 'tap') {
|
||||||
|
// Only allow a tap action to use a default non-config (the more-info config).
|
||||||
|
handleActionConfig(node, hass, config, actionConfig);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ export class FrigateCardMenu extends LitElement {
|
|||||||
config = ev.detail.config;
|
config = ev.detail.config;
|
||||||
}
|
}
|
||||||
|
|
||||||
// These interactions should only be handled by the card, as nothing
|
// These interactions should only be handled by the menu, as nothing
|
||||||
// upstream has the user-provided configuration.
|
// upstream has the user-provided configuration.
|
||||||
ev.stopPropagation();
|
ev.stopPropagation();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user