Skip to content

Commit

Permalink
fix: rules refresh after edit (#315)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienfontaine authored Jun 22, 2024
1 parent 6d6ac15 commit 5ba55c2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/options/center/sections/TabRulesPane.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<dialog ref="addRuleModal" class="modal">
<div class="modal-box w-11/12 max-w-4xl">
<RuleForm v-if="isRuleFormModalOpened" />
<RuleForm v-if="isRuleFormModalOpened" @on-save="refreshRules" />
</div>
</dialog>
</div>
Expand All @@ -34,6 +34,10 @@ const isRuleFormModalOpened = ref(false);
const emitter: any = inject('emitter');
const refreshRules = async () => {
await rulesStore.init();
};
onMounted(() => {
emitter.on(GLOBAL_EVENTS.OPEN_ADD_RULE_MODAL, openAddRuleModal);
emitter.on(GLOBAL_EVENTS.CLOSE_ADD_RULE_MODAL, closeAddRuleModal);
Expand Down

0 comments on commit 5ba55c2

Please sign in to comment.