diff --git a/packages/builder/src/stores/BudiStore.js b/packages/builder/src/stores/BudiStore.js index e7be02f283..e854aa6588 100644 --- a/packages/builder/src/stores/BudiStore.js +++ b/packages/builder/src/stores/BudiStore.js @@ -2,7 +2,6 @@ import { writable } from "svelte/store" export default class BudiStore { constructor(init, opts) { - this.initialState = init const store = writable({ ...init }) /** @@ -33,8 +32,4 @@ export default class BudiStore { }) } } - - reset = () => { - this.store.set({ ...this.initialState }) - } } diff --git a/packages/builder/src/stores/builder/rowActions.js b/packages/builder/src/stores/builder/rowActions.js index a6f214f360..1b6fb57e87 100644 --- a/packages/builder/src/stores/builder/rowActions.js +++ b/packages/builder/src/stores/builder/rowActions.js @@ -13,6 +13,10 @@ export class RowActionStore extends BudiStore { super(initialState) } + reset = () => { + this.store.set(initialState) + } + refreshRowActions = async sourceId => { if (!sourceId) { return