From 534ae2324398ee85d4ed6921a43ee882fbcb3c49 Mon Sep 17 00:00:00 2001 From: retrozinndev Date: Thu, 12 Jun 2025 21:38:32 -0300 Subject: [PATCH] :boom: fix(popup-window): astal thinks onClickedOutside prop is a Widget.Window signal just separated window props from popup-window props --- ags/widget/PopupWindow.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ags/widget/PopupWindow.ts b/ags/widget/PopupWindow.ts index 4b382d1..fe66b05 100644 --- a/ags/widget/PopupWindow.ts +++ b/ags/widget/PopupWindow.ts @@ -45,8 +45,14 @@ export function PopupWindow(props: PopupWindowProps): Widget.Window { css: props.cssBackgroundWindow, }) : undefined; + const winProps: Widget.WindowProps = {}; + for(const key of Object.keys(props).filter(k => k !== "onClickedOutside")) { + // @ts-ignore ignore the `onClickedOutside()` method because astal thinks it's a signal + winProps[key as keyof typeof winProps] = props[key as keyof typeof props]; + } + return new Widget.Window({ - ...props, + ...winProps, namespace: props?.namespace ?? "popup-window", className: `popup-window ${(props.namespace instanceof Binding ? props.namespace.get() : props.namespace) || ""}`,