Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
- Don't change URL/route on edit and clear buttons
- Ensure table refreshes when saving changes to a searcch
  • Loading branch information
jakekreider authored and replicantSocks committed Sep 1, 2023
1 parent f0cafd6 commit fdbc52e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/client/src/components/Modals/SearchPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ export default {
async saveSearch() {
this.apply();
let searchId;
if (this.formData.searchId !== undefined && this.formData.searchId !== null) {
if (this.isEditMode) {
this.updateSavedSearch({
searchId: this.formData.searchId,
searchInfo: {
Expand All @@ -255,6 +255,7 @@ export default {
},
});
searchId = this.formData.searchId;
this.$emit('filters-applied');
} else {
const res = await this.createSavedSearch({
searchInfo: {
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/components/SearchFilter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="align-self-end">
<h4 class="mb-0">{{ selectedSearch === null ? "All Grants" : searchName }} </h4>
<span v-if="selectedSearch !== null">
<a href="#" v-on:click="editFilter">Edit</a> | <a href="#" v-on:click="clearAll" v-if="$props.filterKeys.length > 0">Clear</a>
<a href="#" v-on:click.prevent="editFilter">Edit</a> | <a href="#" v-on:click.prevent="clearAll" v-if="$props.filterKeys.length > 0">Clear</a>
</span>
</div>
<span class="filter-item" v-for="(item, idx) in $props.filterKeys" :key="idx">
Expand Down

0 comments on commit fdbc52e

Please sign in to comment.