mirror of
https://github.com/edufeed-org/edufeed-web.git
synced 2025-12-09 16:24:34 +00:00
Open tree on user search
This commit is contained in:
parent
903291146c
commit
e792f324a8
1 changed files with 2 additions and 3 deletions
|
|
@ -12,7 +12,6 @@
|
|||
:class "checkbox checkbox-warning"
|
||||
:on-change (fn [] (when-not disable-on-change (re-frame/dispatch [::events/toggle-concept [concept field]])))}])
|
||||
|
||||
|
||||
(defn highlight-match
|
||||
"Wraps the matching part of the text in bold markers, preserving the original capitalization.
|
||||
Arguments:
|
||||
|
|
@ -41,13 +40,13 @@
|
|||
prefLabel (highlight-match (-> concept :prefLabel :de) search-input)]
|
||||
[:li
|
||||
(if-let [narrower (:narrower concept)]
|
||||
[:details {:open false}
|
||||
[:details {:open (or search-input false)} ;; open on search
|
||||
[:summary {:class (when toggled "bg-orange-400 text-black")}
|
||||
[concept-checkbox concept field toggled]
|
||||
prefLabel]
|
||||
[:ul {:tabIndex "0"}
|
||||
(for [child narrower]
|
||||
^{:key (:id child)} [concept-label-component [child field]])]]
|
||||
^{:key (:id child)} [concept-label-component [child field search-input]])]]
|
||||
[:a {:class (when toggled "bg-orange-400 text-black")
|
||||
:on-click (fn [] (re-frame/dispatch [::events/toggle-concept [concept field]]))}
|
||||
[concept-checkbox concept field toggled true]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue