Skip to content

Commit

Permalink
fix(dropdown): compact menu items were cut
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
lubber-de authored Feb 2, 2023
1 parent 8415a7a commit 6ae4c9d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/definitions/collections/menu.less
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/*
* # Fomantic - Menu
/*!
* # Fomantic-UI - Menu
* https://github.com/fomantic/Fomantic-UI/
*
*
* Copyright 2015 Contributor
* Released under the MIT license
* https://opensource.org/licenses/MIT
*
Expand Down
6 changes: 6 additions & 0 deletions src/definitions/modules/dropdown.less
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,12 @@ select.ui.dropdown {
/* Compact */
.ui.compact.selection.dropdown {
min-width: 0;
& > .menu {
width: auto;
}
&:not(.multiline) {
width: max-content;
}
}
}

Expand Down

0 comments on commit 6ae4c9d

Please sign in to comment.