diff --git a/CHANGELOG.md b/CHANGELOG.md index e05f2cf1f..84c4ff8e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ * Improve confirmation modal footer for `ControlledVocab` component. Refs STSMACOM-863. * Add the `endDateInputRef` prop to `DateRangeFilter` to access the end date element. Refs STSMACOM-859. * Remove unnecessary `aria-rowindex` in `ItemView` and `ItemEdit` components. Fixes STSMACOM-871. +* Reset `qindex` once the search field is empty. Fixes STSMACOM-872. ## [9.2.0](https://github.com/folio-org/stripes-smart-components/tree/v9.2.0) (2024-10-11) [Full Changelog](https://github.com/folio-org/stripes-smart-components/compare/v9.1.3...v9.2.0) diff --git a/lib/SearchAndSort/SearchAndSort.js b/lib/SearchAndSort/SearchAndSort.js index a0fa1853f..90698d1be 100644 --- a/lib/SearchAndSort/SearchAndSort.js +++ b/lib/SearchAndSort/SearchAndSort.js @@ -645,7 +645,7 @@ class SearchAndSort extends React.Component { } = this.props; this.log('action', 'cleared search query'); this.setState({ locallyChangedSearchTerm: '' }); - this.transitionToParams({ query: '', ...extraParamsToReset }); + this.transitionToParams({ query: '', qindex: '', ...extraParamsToReset }); }; onCloseEdit = (e) => {