Replies: 3 comments 1 reply
-
Currently the dropdown list isn't wrapped in a scroll. The list view will need to be wrapped in a scroll and be targetable with a class. I'm throwing together a Pr to make this possible |
Beta Was this translation helpful? Give feedback.
-
Thank you @jrmoulton I'll close this question as resolved once a minimal example with scrollable list is available here, to serve as a reference for others who might have the same question in the future. |
Beta Was this translation helpful? Give feedback.
-
class styling is nestable. So an example styling might look like let root_view = empty().style(|s| {
s.class(widgets::dropdown::DropDownClass, |s| {
s.items_center()
.padding(5)
.class(widgets::dropdown::DropDownScrollClass, |s| {
s.min_height(0.)
.flex_grow(1.)
.flex_basis(0.)
.height(100)
.class(widgets::ListClass, |s| {
s.class(widgets::ListItemClass, |s| {
s.padding(5).margin_horiz(5).items_center()
})
})
})
})
}); I haven't actually tested that styling but that's the idea. Getting the flex properties for lists in scrolls is always a little tricky. |
Beta Was this translation helpful? Give feedback.
-
How to make the list scrollable and set it to certain height?
Beta Was this translation helpful? Give feedback.
All reactions