Fix dropdown to avoid item text wrap. (#88)

This commit is contained in:
Jason Lee 2024-07-30 19:58:48 +08:00 committed by GitHub
parent 6465969c5a
commit 9766a0766b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View file

@ -72,7 +72,7 @@ impl DropdownStory {
"Banana",
"Grape",
"Pineapple",
"Watermelon",
"Watermelon & This is a longlonglonglonglonglonglonglonglong title",
"Avocado",
];
let fruit_dropdown =

View file

@ -134,7 +134,12 @@ where
.selected(selected)
.input_text_size(size)
.list_size(size)
.child(item.title().to_string());
.child(
div()
.whitespace_nowrap()
.overflow_hidden()
.child(item.title().to_string()),
);
Some(list_item)
} else {
None