mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
Search term filter tag on scene list (#5991)
* Add search term to filter tags on scene list page Clicking on the tag selects all on the search term input. Clicking on the x erases it. * Ensure clear criteria maintains consistent behaviour on other pages
This commit is contained in:
@@ -476,13 +476,23 @@ export class ListFilterModel {
|
||||
return this.setCriteria(criteria);
|
||||
}
|
||||
|
||||
public clearCriteria() {
|
||||
public clearCriteria(clearSearchTerm = false) {
|
||||
const ret = this.clone();
|
||||
if (clearSearchTerm) {
|
||||
ret.searchTerm = "";
|
||||
}
|
||||
ret.criteria = [];
|
||||
ret.currentPage = 1;
|
||||
return ret;
|
||||
}
|
||||
|
||||
public clearSearchTerm() {
|
||||
const ret = this.clone();
|
||||
ret.searchTerm = "";
|
||||
ret.currentPage = 1; // reset to first page
|
||||
return ret;
|
||||
}
|
||||
|
||||
public setCriteria(criteria: Criterion[]) {
|
||||
const ret = this.clone();
|
||||
ret.criteria = criteria;
|
||||
|
||||
Reference in New Issue
Block a user