mirror of
https://github.com/penpot/penpot.git
synced 2025-05-29 20:46:10 +02:00
🐛 Fix colorpicker scroll when dropdown displayed
This commit is contained in:
parent
965d2d4036
commit
ccb6e25914
4 changed files with 5 additions and 3 deletions
|
@ -23,7 +23,7 @@
|
|||
[item item item]))
|
||||
|
||||
(mf/defc select
|
||||
[{:keys [default-value options class dropdown-class is-open? on-change on-pointer-enter-option on-pointer-leave-option disabled]}]
|
||||
[{:keys [default-value options class dropdown-class is-open? on-change on-pointer-enter-option on-pointer-leave-option disabled data-direction]}]
|
||||
(let [label-index (mf/with-memo [options]
|
||||
(into {} (map as-key-value) options))
|
||||
|
||||
|
@ -112,7 +112,7 @@
|
|||
[:span {:class (stl/css :current-label)} current-label]
|
||||
[:span {:class (stl/css :dropdown-button)} i/arrow]
|
||||
[:& dropdown {:show is-open? :on-close close-dropdown}
|
||||
[:ul {:ref dropdown-element* :data-direction @dropdown-direction*
|
||||
[:ul {:ref dropdown-element* :data-direction (or data-direction @dropdown-direction*)
|
||||
:class (dm/str dropdown-class " " (stl/css :custom-select-dropdown))}
|
||||
(for [[index item] (d/enumerate options)]
|
||||
(if (= :separator item)
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
.colorpicker {
|
||||
border-radius: $br-8;
|
||||
overflow: auto;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.colorpicker-tabs {
|
||||
|
|
|
@ -124,6 +124,7 @@
|
|||
[:div {:class (stl/css :select-wrapper)}
|
||||
[:& select
|
||||
{:class (stl/css :shadow-type-select)
|
||||
:data-direction "up"
|
||||
:default-value (or (d/name selected) "recent")
|
||||
:options options
|
||||
:on-change on-library-change}]]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue