Skip to content

Commit

Permalink
Merge pull request #3759 from nextcloud/fix/nc-select-small
Browse files Browse the repository at this point in the history
`NcSelect`: Selected options should not overflow the container
  • Loading branch information
mejo- authored Feb 22, 2023
2 parents cf3c71d + 987e090 commit 9dd000a
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/components/NcSelect/NcSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1007,6 +1007,36 @@ body {
}
}
}
// Hide search from dom if unused to prevent unneeded flex wrap
.vs__search[readonly] {
position: absolute;
}
// If search if hidden, ensure that the height of the search is the same
.vs__selected-options {
min-height: 40px; // 36px search height + 4px search margin
}
/**
* Fix overlow of selected options
* There is an upstream pull request, if it is merged and released remove this fix
* https://github.com/sagalbot/vue-select/pull/1756
*/
.vs__selected-options {
min-width: 0;
.vs__selected {
min-width: 0;
}
}
&.vs--single {
&.vs--loading,
&.vs--open {
.vs__selected {
// Fix `max-width` for `position: absolute`
max-width: 100%;
}
}
}
}
.vs__dropdown-menu {
Expand Down

0 comments on commit 9dd000a

Please sign in to comment.