fix(regression): 2nd modal doesn't close for remove graph cmd

or any commands using dialog-select!. Modal used to display search
commands didn't close after selecting an item
This commit is contained in:
Gabriel Horner
2024-10-14 14:01:05 -04:00
parent c7469efbe1
commit 500da0d7e1
2 changed files with 5 additions and 4 deletions

View File

@@ -1,8 +1,8 @@
(ns frontend.components.select
"Generic component for fuzzy searching items to select an item. See
select-config to add a new use or select-type for this component. To use the
new select-type, set :ui/open-select to the select-type. See
:graph/open command for an example."
new select-type, create an event that calls `select/dialog-select!` with the
select-type. See the :graph/open command for a full example."
(:require [frontend.modules.shortcut.core :as shortcut]
[frontend.context.i18n :refer [t]]
[frontend.search :as search]
@@ -243,10 +243,10 @@
#(select (-> select-type-config
(assoc :on-chosen (fn [it]
(on-chosen' it)
(shui/dialog-close! :ls-select-modal)))
(shui/dialog-close-all!)))
(select-keys [:on-chosen :empty-placeholder :prompt-key])
(assoc :items ((:items-fn select-type-config)))))
{:id :ls-select-modal
:close-btn? false
:align :top
:content-props {:class "ls-dialog-select"}}))))
:content-props {:class "ls-dialog-select"}}))))