update: count store id gradually up instead of "randomizing" one
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -19,12 +19,13 @@ type NextElements = {
|
||||
nextEdges: Edge[]
|
||||
}
|
||||
const pinia = createPinia()
|
||||
let id = 0
|
||||
|
||||
export default function useFlowStore(preloadedState: FlowState): StoreDefinition<string, FlowState, any, FlowActions> {
|
||||
setActivePinia(pinia)
|
||||
|
||||
return defineStore({
|
||||
id: `vue-flow-${Math.floor(Math.random() * 100)}`,
|
||||
id: `vue-flow-${id++}`,
|
||||
state: () => ({
|
||||
...preloadedState,
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user