We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c6ed5bc commit d3feb1fCopy full SHA for d3feb1f
packages/node_modules/proxy-state-tree/src/index.ts
@@ -138,6 +138,16 @@ export class ProxyStateTree<T extends object> implements IProxyStateTree<T> {
138
return () =>
139
this.mutationCallbacks.splice(this.mutationCallbacks.indexOf(callback), 1)
140
}
141
+ forceFlush() {
142
+ const emptyMutations = []
143
+ const emptyPaths = new Set()
144
+ for (let key in this.pathDependencies) {
145
+ const callbacks = this.pathDependencies[key]
146
+ callbacks.forEach((callback) => {
147
+ callback(emptyMutations, emptyPaths, this.currentFlushId++, false)
148
+ })
149
+ }
150
151
flush(trees, isAsync: boolean = false) {
152
let changes
153
if (Array.isArray(trees)) {
0 commit comments