Skip to content

Commit 4f6d1e7

Browse files
committed
fix(ModelManager): Attach a view ID to new views
1 parent d5361d4 commit 4f6d1e7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/core/ModelManager.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export default class ModelManager {
4747
this.activeViewIndex = 0;
4848
this.collapseState = {};
4949
this.listeners = [];
50+
this.nextViewId = 0;
5051
}
5152

5253
get data() {
@@ -139,7 +140,7 @@ export default class ModelManager {
139140
const index = viewList.length;
140141
const name = `${this.localizedData.getView(viewName)} ${index}`;
141142

142-
viewList.push({ name });
143+
viewList.push({ name, id: this.nextViewId++ });
143144
this.data = assignObjKey(this.data, viewName, viewList);
144145
this.activateView(viewName, index);
145146
}

0 commit comments

Comments
 (0)