mobx-formly 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/path-store.js +6 -4
- package/package.json +1 -1
package/dist/path-store.js
CHANGED
|
@@ -9,8 +9,8 @@ import { observable } from 'mobx';
|
|
|
9
9
|
*/
|
|
10
10
|
export class PathStore {
|
|
11
11
|
store = observable.map();
|
|
12
|
-
counts =
|
|
13
|
-
children =
|
|
12
|
+
counts = observable.map();
|
|
13
|
+
children = observable.map({}, { deep: false });
|
|
14
14
|
proxies = new Map();
|
|
15
15
|
/** Whether a value is stored at the exact path. */
|
|
16
16
|
has(path) { return this.store.has(path); }
|
|
@@ -124,8 +124,10 @@ export class PathStore {
|
|
|
124
124
|
this.counts.set(current, (this.counts.get(current) ?? 0) + 1);
|
|
125
125
|
const parent = parts.slice(0, index - 1).join('.');
|
|
126
126
|
let siblings = this.children.get(parent);
|
|
127
|
-
if (!siblings)
|
|
128
|
-
|
|
127
|
+
if (!siblings) {
|
|
128
|
+
siblings = observable.set();
|
|
129
|
+
this.children.set(parent, siblings);
|
|
130
|
+
}
|
|
129
131
|
siblings.add(parts[index - 1]);
|
|
130
132
|
}
|
|
131
133
|
}
|
package/package.json
CHANGED