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

STCOM-1324 Bug: Multiselection filter text remains after selection is made. #2338

Merged
merged 2 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
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
Loading