diff --git a/dist/views/request.js b/dist/views/request.js index 5a60baf..ab20a1e 100644 --- a/dist/views/request.js +++ b/dist/views/request.js @@ -122,10 +122,13 @@ class Request extends Component { let filter = this.#filter let waited = this.#onlyShowWaited - this.list = this.#list - .filter(it => it.id.includes(filter) && (waited ? it.stat === 1 : true)) - .slice(start, end) - this.total = (filter || waited ? this.list : this.#list).length + let list = this.#list.filter( + it => it.id.includes(filter) && (waited ? it.stat === 1 : true) + ) + + this.list = list.slice(start, end) + + this.total = list.length } #pageChanged(ev) { @@ -140,10 +143,7 @@ class Request extends Component { this.#filter = filter this.#onlyShowWaited = waited - this.list = this.#list.filter( - it => it.id.includes(filter) && (waited ? it.stat === 1 : true) - ) - this.total = this.list.length + this.#fetchPage() } #openDialog() {