mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
Clear search term when clicking popover pill (#3408)
This commit is contained in:
@@ -91,6 +91,13 @@ export const ListFilter: React.FC<IListFilterProps> = ({
|
|||||||
}
|
}
|
||||||
}, [customPageSizeShowing, perPageFocus]);
|
}, [customPageSizeShowing, perPageFocus]);
|
||||||
|
|
||||||
|
// clear search input when filter is cleared
|
||||||
|
useEffect(() => {
|
||||||
|
if (filter.searchTerm === "") {
|
||||||
|
queryRef.current.value = "";
|
||||||
|
}
|
||||||
|
}, [filter.searchTerm, queryRef]);
|
||||||
|
|
||||||
function onChangePageSize(val: string) {
|
function onChangePageSize(val: string) {
|
||||||
if (val === "custom") {
|
if (val === "custom") {
|
||||||
// added timeout since Firefox seems to trigger the rootClose immediately
|
// 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))
|
* Changed performer aliases to be a list, rather than a string field. ([#3113](https://github.com/stashapp/stash/pull/3113))
|
||||||
|
|
||||||
### 🐛 Bug fixes
|
### 🐛 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 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 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))
|
* 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) {
|
if (params.q) {
|
||||||
this.searchTerm = params.q.trim();
|
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;
|
this.currentPage = params.p ? Number.parseInt(params.p, 10) : 1;
|
||||||
if (params.perPage) this.itemsPerPage = Number.parseInt(params.perPage, 10);
|
if (params.perPage) this.itemsPerPage = Number.parseInt(params.perPage, 10);
|
||||||
|
|||||||
Reference in New Issue
Block a user