mirror of
https://github.com/logseq/logseq.git
synced 2026-04-24 14:14:55 +00:00
fix: new option should be the first choice
This commit is contained in:
@@ -138,16 +138,14 @@
|
||||
(not (contains? selected-choices (:value item))))
|
||||
search-result')
|
||||
search-result')
|
||||
new-option {:value @*input
|
||||
:label (str "+ New option: " @*input)}
|
||||
search-result (if (and show-new-when-not-exact-match?
|
||||
(not exact-match?)
|
||||
(not (string/blank? @*input))
|
||||
(not (exact-match-exclude-items @*input)))
|
||||
(->>
|
||||
(cons
|
||||
(first search-result')
|
||||
(cons {:value @*input
|
||||
:label (str "+ New option: " @*input)}
|
||||
(rest search-result')))
|
||||
(cons new-option search-result')
|
||||
(remove nil?))
|
||||
search-result')
|
||||
input-opts' (if (fn? input-opts) (input-opts (empty? search-result)) input-opts)
|
||||
|
||||
Reference in New Issue
Block a user