Skip to content

Commit

Permalink
Allow both search and filter to be specified simultaneously in entry …
Browse files Browse the repository at this point in the history
…table (#1010)
  • Loading branch information
BenjaminCharmes authored Nov 19, 2024
1 parent d9ebe84 commit ae09e24
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions webapp/src/components/DynamicDataTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
:filters="filters"
:editable-inventory="editable_inventory"
:show-buttons="showButtons"
@update:filters="updateFilters"
@open-create-item-modal="createItemModalIsOpen = true"
@open-batch-create-item-modal="batchCreateItemModalIsOpen = true"
@open-qr-scanner-modal="qrScannerModalIsOpen = true"
Expand Down Expand Up @@ -362,6 +363,9 @@ export default {
});
},
methods: {
updateFilters(newFilters) {
this.filters = newFilters;
},
goToEditPage(event) {
const row = event.data;
let row_id = null;
Expand Down
3 changes: 3 additions & 0 deletions webapp/src/components/DynamicDataTableButtons.vue
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,9 @@ export default {
this.isSelectedDropdownVisible = false;
}
},
"localFilters.global.value"(newValue) {
this.$emit("update:filters", { ...this.filters, global: { value: newValue } });
},
},
methods: {
confirmDeletion() {
Expand Down

0 comments on commit ae09e24

Please sign in to comment.