mirror of https://github.com/stashapp/stash.git
Clear search term when clicking popover pill (#3408)
This commit is contained in:
parent
6f2057a51e
commit
cb3545a303
|
@ -91,6 +91,13 @@ export const ListFilter: React.FC<IListFilterProps> = ({
|
|||
}
|
||||
}, [customPageSizeShowing, perPageFocus]);
|
||||
|
||||
// clear search input when filter is cleared
|
||||
useEffect(() => {
|
||||
if (filter.searchTerm === "") {
|
||||
queryRef.current.value = "";
|
||||
}
|
||||
}, [filter.searchTerm, queryRef]);
|
||||
|
||||
function onChangePageSize(val: string) {
|
||||
if (val === "custom") {
|
||||
// added timeout since Firefox seems to trigger the rootClose immediately
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
* Changed performer aliases to be a list, rather than a string field. ([#3113](https://github.com/stashapp/stash/pull/3113))
|
||||
|
||||
### 🐛 Bug fixes
|
||||
* Fixed clicking popover pills not clearing search term. ([#3408](https://github.com/stashapp/stash/pull/3408))
|
||||
* Fixed URL not being preserved when redirected to login. ([#3305](https://github.com/stashapp/stash/pull/3305))
|
||||
* Fixed scene previews not being overwritten when Overwrite option is selected. ([#3256](https://github.com/stashapp/stash/pull/3256))
|
||||
* Fixed objects without titles not being sorted correctly with objects with titles. ([#3244](https://github.com/stashapp/stash/pull/3244))
|
||||
|
|
|
@ -93,6 +93,9 @@ export class ListFilterModel {
|
|||
}
|
||||
if (params.q) {
|
||||
this.searchTerm = params.q.trim();
|
||||
} else {
|
||||
// #1795 - reset search term if not provided
|
||||
this.searchTerm = "";
|
||||
}
|
||||
this.currentPage = params.p ? Number.parseInt(params.p, 10) : 1;
|
||||
if (params.perPage) this.itemsPerPage = Number.parseInt(params.perPage, 10);
|
||||
|
|
Loading…
Reference in New Issue