Skip to content

Commit

Permalink
fix(NcSelect): Only hide search input if disabled and an element was …
Browse files Browse the repository at this point in the history
…selected

This fixes a regression where the placeholder text is not shown
if configured to be not searchable.

Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
  • Loading branch information
susnux committed Feb 28, 2023
1 parent e719139 commit c350a66
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/components/NcSelect/NcSelect.vue
Expand Up @@ -1008,13 +1008,14 @@ 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 {
// If search is hidden, ensure that the height of the search is the same
min-height: 40px; // 36px search height + 4px search margin
// Hide search from dom if unused to prevent unneeded flex wrap
.vs__selected ~ .vs__search[readonly] {
position: absolute;
}
}
/**
Expand Down

0 comments on commit c350a66

Please sign in to comment.