From d9b7e1ffd37c43c868d17b9aeef546700851cf4f Mon Sep 17 00:00:00 2001 From: Adam Rutkowski Date: Wed, 17 May 2023 17:03:20 +0200 Subject: [PATCH] wip --- lib/plausible_web/live/funnel_settings/input_picker.ex | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/plausible_web/live/funnel_settings/input_picker.ex b/lib/plausible_web/live/funnel_settings/input_picker.ex index 249e29a15..a2c1f07c4 100644 --- a/lib/plausible_web/live/funnel_settings/input_picker.ex +++ b/lib/plausible_web/live/funnel_settings/input_picker.ex @@ -168,6 +168,11 @@ defmodule PlausibleWeb.Live.FunnelSettings.InputPicker do {:noreply, socket} end + def handle_event("keypress", %{"key" => "Escape"}, socket) do + socket = do_select(socket, "", "") + {:noreply, socket} + end + def handle_event("keypress", %{"key" => _other, "value" => typed}, socket) do if String.length(typed) > 0 do choices =