mirror of
https://github.com/penpot/penpot.git
synced 2025-01-06 14:50:20 -05:00
Prevent selection on disabled selects
This commit is contained in:
parent
c6f5da8873
commit
5c83247256
2 changed files with 7 additions and 2 deletions
|
@ -62,7 +62,7 @@
|
|||
[:span {:class (stl/css :check-icon)} i/tick]])))]]])
|
||||
|
||||
(mf/defc editable-select
|
||||
[{:keys [value options class on-change placeholder on-blur on-token-remove position input-props] :as params}]
|
||||
[{:keys [value options disabled class on-change placeholder on-blur on-token-remove position input-props] :as params}]
|
||||
(let [{:keys [type]} input-props
|
||||
input-class (:class input-props)
|
||||
state* (mf/use-state {:id (uuid/next)
|
||||
|
@ -215,7 +215,8 @@
|
|||
(mf/set-ref-val! emit-blur? (not is-open?)))
|
||||
|
||||
|
||||
[:div {:class (dm/str class " " (stl/css :editable-select))}
|
||||
[:div {:class (dm/str class " " (stl/css-case :editable-select true
|
||||
:editable-select-disabled disabled))}
|
||||
(when-let [{:keys [label value]} token]
|
||||
[:div {:title (str label ": " value)
|
||||
:class (stl/css :token-pill)}
|
||||
|
|
|
@ -137,3 +137,7 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.editable-select-disabled {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue