Skip to content

Commit

Permalink
[format] Shorten lines
Browse files Browse the repository at this point in the history
  • Loading branch information
kimo-k committed Dec 21, 2023
1 parent abbd55e commit 7f583a7
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions src/re_com/dropdown.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,12 @@
(or filter-box? free-text?))) ;; Use this boolean to allow/prevent the key from being processed by the text box
dropdown [:div
(merge
{:class (str "rc-dropdown chosen-container " (if free-text? "chosen-container-multi " "chosen-container-single ") "noselect " (when (or @drop-showing? @free-text-focused?) "chosen-container-active ") (when @drop-showing? "chosen-with-drop ") class) ;; Prevent user text selection
{:class (str "rc-dropdown chosen-container "
(if free-text? "chosen-container-multi " "chosen-container-single ")
"noselect "
(when (or @drop-showing? @free-text-focused?) "chosen-container-active ")
(when @drop-showing? "chosen-with-drop ")
class) ;; Prevent user text selection
:style (merge (flex-child-style (if width "0 0 auto" "auto"))
(align-style :align-self :start)
{:width width}
Expand All @@ -597,13 +602,17 @@
attr)
(cond
just-drop? nil
free-text? [free-text-dropdown-top free-text-input select-free-text? free-text-focused? free-text-sel-range internal-model tab-index placeholder dropdown-click key-handler filter-box? drop-showing? cancel width free-text-change auto-complete? choices capitalize? disabled?]
:else [dropdown-top internal-model choices id-fn label-fn tab-index placeholder dropdown-click key-handler filter-box? drop-showing? title? disabled?])
free-text? [free-text-dropdown-top free-text-input select-free-text? free-text-focused? free-text-sel-range
internal-model tab-index placeholder dropdown-click key-handler filter-box? drop-showing? cancel
width free-text-change auto-complete? choices capitalize? disabled?]
:else [dropdown-top internal-model choices id-fn label-fn tab-index placeholder dropdown-click key-handler
filter-box? drop-showing? title? disabled?])
(when (and @drop-showing? (not disabled?))
[:div
(merge
{:class (str "chosen-drop rc-dropdown-chosen-drop " (get-in parts [:chosen-drop :class]))
:style (merge (when @drop-above? {:transform (gstring/format "translate3d(0px, -%ipx, 0px)" (+ top-height @drop-height -2))})
:style (merge (when @drop-above? {:transform (gstring/format "translate3d(0px, -%ipx, 0px)"
(+ top-height @drop-height -2))})
(get-in parts [:chosen-drop :style]))}
(get-in parts [:chosen-drop :attr]))
(when (and (or filter-box? (not free-text?))
Expand Down

0 comments on commit 7f583a7

Please sign in to comment.