Skip to content

Commit

Permalink
Multiselection - remove filter value on item selection (#2338)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnC-80 authored Aug 19, 2024
1 parent 640bbc4 commit 0ccd65a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
* Expose `aria-label` for SearchField Index `<Select>`. Refs STCOM-1329.
* `<FilterAccordionHeader>` - move focus to accordion header after clear button is pressed. Refs STCOM-1330.
* Remove `tabIndex="-1"` from `<Datepicker>`'s clear button, placing it in tab order. Refs STCOM-1322.
* `<MultiSelection>` Bugfix - remove filter value after an item is selected. Refs STCOM-1324.

## [12.1.0](https://github.com/folio-org/stripes-components/tree/v12.1.0) (2024-03-12)
[Full Changelog](https://github.com/folio-org/stripes-components/compare/v12.0.0...v12.1.0)
Expand Down
1 change: 1 addition & 0 deletions lib/MultiSelection/MultiSelection.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ const MultiSelection = ({
addSelectedItem,
onAdd
);
setFilterValue('');
}
break;
default:
Expand Down
2 changes: 2 additions & 0 deletions lib/MultiSelection/tests/MultiSelection-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,8 @@ describe('MultiSelect', () => {
multiselection.has({ selectedCount: 1 });
OptionInteractor({ selected: [`${listOptions[5].label}`] });
});

it('empties the filter field', () => multiselection.has({ filterValue: '' }));
});

describe('No options available after filtering', () => {
Expand Down

0 comments on commit 0ccd65a

Please sign in to comment.