tooltip: 'Import the state from a JSON file',
},
],
+ nodeActions: [
+ {
+ icon: 'restore',
+ tooltip: 'Reset the state (option store only)',
+ action: (nodeId) => {
+ const store = pinia._s.get(nodeId)
+ if (!store) {
+ toastMessage(
+ `Cannot reset "${nodeId}" store because it wasn't found.`,
+ 'warn'
+ )
+ } else if (!store._isOptionsAPI) {
+ toastMessage(
+ `Cannot reset "${nodeId}" store because it's a setup store.`,
+ 'warn'
+ )
+ } else {
+ store.$reset()
+ toastMessage(`Store "${nodeId}" reset.`)
+ }
+ },
+ },
+ ],
})
api.on.inspectComponent((payload, ctx) => {