Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(MultiSelect.Filterable): dynamically resize selection count #7446

Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 14 additions & 12 deletions packages/components/src/components/multi-select/_multi-select.scss
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,22 @@
color: $text-01;
}

.#{$prefix}--multi-select--filterable .#{$prefix}--text-input {
padding-left: $spacing-03;
}

.#{$prefix}--multi-select--filterable:hover .#{$prefix}--text-input {
background-color: $hover-ui;
}

.#{$prefix}--multi-select--filterable.#{$prefix}--list-box--disabled:hover
.#{$prefix}--text-input {
background-color: $field-01;
}

.#{$prefix}--multi-select--filterable {
.#{$prefix}--list-box__selection--multi {
position: absolute;
right: auto;
left: $carbon--spacing-03;
margin: 0 0 0 $spacing-05;
}
}

Expand All @@ -70,15 +81,6 @@
background-color: transparent;
border-bottom: 0;
}

.#{$prefix}--multi-select--selected .#{$prefix}--text-input {
// this value will need to change based on the number of digits in
// the number of items selected
//
// i.e. the input field needs adjusted padding to account for the width of
// the number in <ListBox.Selection>
padding-left: carbon--mini-units(7);
}
}

@include exports('multi-select') {
Expand Down