Add search term filter tag to scene list filter tags (#6095)

* 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
* Hide search term tag when input is visible
This commit is contained in:
WithoutPants
2025-09-24 10:45:09 +10:00
committed by GitHub
parent 793a5f826e
commit 3bb771a149
8 changed files with 116 additions and 38 deletions

View File

@@ -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;