Skip to content

Commit

Permalink
set page to first when filters updated
Browse files Browse the repository at this point in the history
  • Loading branch information
dmeidlin committed Feb 2, 2023
1 parent fa8e3ff commit 1335931
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/components/experiments/ExperimentsObservationsTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
backend-sorting
v-bind:default-sort="[fieldMap['name'], 'ASC']"
v-on:sort="setSort"
v-on:search="filters = $event"
v-on:search="initSearch"
v-bind:search-debounce="400"
>
<b-table-column label="Title" field="name" cell-class="fixed-width-wrapped" sortable v-slot="props" :th-attrs="(column) => ({scope:'col'})" searchable>
Expand Down Expand Up @@ -209,6 +209,12 @@ export default class ExperimentsObservationsTable extends Vue {
}
}

initSearch(filters: any) {
this.filters = filters;

// When filtering the list, set a page to the first page
this.paginationController.updatePage(1);
}
}

</script>

0 comments on commit 1335931

Please sign in to comment.