Add allowPropagation option.
This commit is contained in:
@@ -18,7 +18,7 @@ interface ActionHandler extends HTMLElement {
|
|||||||
bind(element: Element, options): void;
|
bind(element: Element, options): void;
|
||||||
}
|
}
|
||||||
interface ActionHandlerElement extends HTMLElement {
|
interface ActionHandlerElement extends HTMLElement {
|
||||||
actionHandlerOptions?: ActionHandlerOptions;
|
actionHandlerOptions?: FrigateCardActionHandlerOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
@@ -27,6 +27,10 @@ declare global {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface FrigateCardActionHandlerOptions extends ActionHandlerOptions {
|
||||||
|
allowPropagation?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
class ActionHandler extends HTMLElement implements ActionHandler {
|
class ActionHandler extends HTMLElement implements ActionHandler {
|
||||||
public holdTime = 400;
|
public holdTime = 400;
|
||||||
|
|
||||||
@@ -171,7 +175,7 @@ const getActionHandler = (): ActionHandler => {
|
|||||||
|
|
||||||
export const actionHandlerBind = (
|
export const actionHandlerBind = (
|
||||||
element: ActionHandlerElement,
|
element: ActionHandlerElement,
|
||||||
options?: ActionHandlerOptions,
|
options?: FrigateCardActionHandlerOptions,
|
||||||
): void => {
|
): void => {
|
||||||
const actionhandler: ActionHandler = getActionHandler();
|
const actionhandler: ActionHandler = getActionHandler();
|
||||||
if (!actionhandler) {
|
if (!actionhandler) {
|
||||||
@@ -188,6 +192,6 @@ export const actionHandler = directive(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-empty-function, @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-empty-function, @typescript-eslint/no-unused-vars
|
||||||
render(_options?: ActionHandlerOptions) {}
|
render(_options?: FrigateCardActionHandlerOptions) {}
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user