From 8c05db23f42487944463c94698c0becc2be2b15f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Pacana?= Date: Thu, 21 Mar 2024 22:45:25 +0100 Subject: [PATCH] No arguments required --- ruby_event_store-browser/elm/src/Layout.elm | 8 ++++---- ruby_event_store-browser/public/bootstrap.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ruby_event_store-browser/elm/src/Layout.elm b/ruby_event_store-browser/elm/src/Layout.elm index a2f55e622c..7ce1dfb6ef 100644 --- a/ruby_event_store-browser/elm/src/Layout.elm +++ b/ruby_event_store-browser/elm/src/Layout.elm @@ -28,7 +28,7 @@ type Msg | SearchedStreamsFetched (Result Http.Error (List SearchStream)) | OnSelect Search.Stream | OnQueryChanged Search.Stream - | RequestSearch String + | RequestSearch | ToggleBookmark String @@ -49,7 +49,7 @@ type alias Bookmark = port toggleDialog : String -> Cmd msg -port requestSearch : (String -> msg) -> Sub msg +port requestSearch : (() -> msg) -> Sub msg port toggleBookmark : String -> Cmd msg @@ -57,7 +57,7 @@ port toggleBookmark : String -> Cmd msg subscriptions : Sub Msg subscriptions = - requestSearch RequestSearch + requestSearch (always RequestSearch) buildModel : Model @@ -137,7 +137,7 @@ update msg model = Nothing -> ( model, Cmd.none ) - RequestSearch _ -> + RequestSearch -> ( model, toggleDialog searchModalId ) ToggleBookmarksMenu -> diff --git a/ruby_event_store-browser/public/bootstrap.js b/ruby_event_store-browser/public/bootstrap.js index 97d127c998..48ff291db9 100644 --- a/ruby_event_store-browser/public/bootstrap.js +++ b/ruby_event_store-browser/public/bootstrap.js @@ -17,7 +17,7 @@ app.ports.toggleDialog.subscribe(function (id) { window.addEventListener("keydown", (event) => { if (event.key === "k" && (event.ctrlKey || event.metaKey)) { - app.ports.requestSearch.send(""); + app.ports.requestSearch.send(null); event.preventDefault(); } });