Skip to content

Commit

Permalink
reset filters on route change
Browse files Browse the repository at this point in the history
  • Loading branch information
ankitchauhan-aka committed Jun 12, 2024
1 parent 89788cc commit 63e9a3c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/renderer/components/ft-radio-button/ft-radio-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default defineComponent({
initialValueIndex: {
type: Number,
default: 0
},
}
},
emits: ['change'],
data: function () {
Expand Down
7 changes: 7 additions & 0 deletions src/renderer/components/top-nav/top-nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,13 @@ export default defineComponent({
return this.$t('Open New Window')
}
},
watch: {
$route () {
// Reset filters if route changes
this.$store.commit('setSearchSettingsToDefault')
this.$store.commit('setSearchFilterValueChanged', false)
}
},
mounted: function () {
let previousWidth = window.innerWidth
if (window.innerWidth <= MOBILE_WIDTH_THRESHOLD) {
Expand Down

0 comments on commit 63e9a3c

Please sign in to comment.