Skip to content

Commit

Permalink
feat: reset search on opening change spool dialog
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Dej <[email protected]>
  • Loading branch information
meteyou committed Oct 3, 2023
1 parent 97643eb commit 5a90fae
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/dialogs/SpoolmanChangeSpoolDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@

<script lang="ts">
import Component from 'vue-class-component'
import { Mixins, Prop } from 'vue-property-decorator'
import { Mixins, Prop, Watch } from 'vue-property-decorator'
import BaseMixin from '@/components/mixins/base'
import Panel from '@/components/ui/Panel.vue'
import { mdiCloseThick, mdiAdjust, mdiDatabase, mdiMagnify, mdiRefresh } from '@mdi/js'
Expand Down Expand Up @@ -159,5 +159,10 @@ export default class SpoolmanChangeSpoolDialog extends Mixins(BaseMixin) {
this.$store.dispatch('server/spoolman/setActiveSpool', spool.id)
this.close()
}
@Watch('showDialog')
onShowDialogChanged(newVal: boolean) {
if (newVal) this.search = ''
}
}
</script>

0 comments on commit 5a90fae

Please sign in to comment.