Skip to content

Commit 2bb7ee8

Browse files
committed
[dropdown] Apply :style & :attr only to the wrapper part, not the anchor-wrapper
1 parent 465d3d9 commit 2bb7ee8

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66

77
- `dropdown`: `:offset-x` and `:offset-y` (number) props.
88

9+
#### Changed
10+
11+
- `dropdown`: made `:style` & `:attr` props apply only to the wrapper part, not the anchor-wrapper.
12+
- `tree-select-dropdown`: made `:style` & `:attr` props apply only to the wrapper part, not the dropdown-anchor-wrapper.
913

1014
## 2.24.1 (2025-02-19)
1115

src/re_com/dropdown.cljs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -444,11 +444,9 @@
444444
[gap :size "5px"]
445445
(part ::indicator {:props part-props
446446
:impl re-com.dropdown/indicator})]}
447-
:post-props {:style (merge (:style args)
448-
(select-keys args [:width :min-width :max-width])
447+
:post-props {:style (merge (select-keys args [:width :min-width :max-width])
449448
(when anchor-height {:height anchor-height})
450-
(when anchor-width {:width anchor-width}))
451-
:attr (:attr args)}})
449+
(when anchor-width {:width anchor-width}))}})
452450
(when (= :open (:openable state))
453451
[body-wrapper
454452
{:anchor-ref anchor-ref

0 commit comments

Comments
 (0)