Skip to content

Commit 6ae4c9d

Browse files
authored
fix(dropdown): compact menu items were cut
Whenever a compact selection dropdown has got large menu items and a shorter menu item was selected, the whole dropdown menu was shrinked to the selected item width which in turn cropped all other items when the menu was opened again This PR make sure by default the items text is not cropped and shown in one line. In case somebody wants to wrap item text by whitespace one could add multiline to the menu node.
1 parent 8415a7a commit 6ae4c9d

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/definitions/collections/menu.less

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
/*
2-
* # Fomantic - Menu
1+
/*!
2+
* # Fomantic-UI - Menu
33
* https://github.com/fomantic/Fomantic-UI/
44
*
55
*
6-
* Copyright 2015 Contributor
76
* Released under the MIT license
87
* https://opensource.org/licenses/MIT
98
*

src/definitions/modules/dropdown.less

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,12 @@ select.ui.dropdown {
425425
/* Compact */
426426
.ui.compact.selection.dropdown {
427427
min-width: 0;
428+
& > .menu {
429+
width: auto;
430+
}
431+
&:not(.multiline) {
432+
width: max-content;
433+
}
428434
}
429435
}
430436

0 commit comments

Comments
 (0)