Skip to content

Commit

Permalink
fix(MultiSelect.Filterable): dynamically resize selection count (#7446)
Browse files Browse the repository at this point in the history
* fix(FilterableMultiSelect): avoid absolute positioning

* fix(MultiSelect.Filterable): dynamically resize input field

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
emyarod and kodiakhq[bot] committed Dec 14, 2020
1 parent 8e8867c commit ea6c8ed
Showing 1 changed file with 14 additions and 12 deletions.
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

0 comments on commit ea6c8ed

Please sign in to comment.