Commit 9b21224
committed
Merge branch 'bugfix/SelectableTreeView' into develop
Previously, there was a bug where multiple instances of a `SelectableTreeView` on a single page would not work correctly. This occurred, for instance, when multiple relationship attributes were defined for a single Content Type (either directly, or via attribute inheritance). While this scenario is rare, it should be supported. In this case, only the data from the first tree would render—but it would be associated with the attribute and backing field of the last tree, which made this bug especially confusing and potentially problematic in terms of data integrity.
This was ultimately caused by the `root` node being stored as part of the `OnTopic.SelectableTreeView.defaults` object, which is shared between multiple instances. By moving the creation of a new `AsyncTreeNode` object for the root into the `OnTopic.SelectableTreeView` constructor, this is mitigated, and multiple `SelectableTreeView` instances can once again live peacefully on one topic.
This resolves Issue #6.3 files changed
Lines changed: 16 additions & 13 deletions
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
22 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
23 | 24 | | |
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | | - | |
| 53 | + | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
Lines changed: 10 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
64 | 74 | | |
65 | 75 | | |
66 | 76 | | |
| |||
100 | 110 | | |
101 | 111 | | |
102 | 112 | | |
103 | | - | |
104 | 113 | | |
105 | 114 | | |
106 | 115 | | |
107 | 116 | | |
108 | 117 | | |
109 | 118 | | |
110 | 119 | | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | 120 | | |
119 | 121 | | |
0 commit comments