From 42700fc582f3a97036144323ee90d5872f0ec358 Mon Sep 17 00:00:00 2001 From: Philipp Rudiger Date: Thu, 22 Aug 2024 14:28:57 +0200 Subject: [PATCH] Disable suggestion button briefly after click (#691) --- lumen/ai/assistant.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lumen/ai/assistant.py b/lumen/ai/assistant.py index a98a7c89..5f426e4e 100644 --- a/lumen/ai/assistant.py +++ b/lumen/ai/assistant.py @@ -220,6 +220,9 @@ async def run_demo(event): on_click=run_demo, margin=5, )) + disable_js = "cb_obj.origin.disabled = true; setTimeout(() => cb_obj.origin.disabled = false, 3000)" + for b in suggestion_buttons: + b.js_on_click(code=disable_js) message = self.interface.objects[-1] if inplace: