Commit c0ea5c6
committed
fix: PrimeNG p-tree refresh on node expand
Replace refreshTrigger.update() with _rootOptionsData.update(prev => [...prev])
in handleOptionsResponse for both connect and download components.
PrimeNG p-tree does reference-equality check on [value] binding. The old
approach mutated node.children in-place and incremented a trigger signal,
but rootOptions computed still returned the same array reference — PrimeNG
never detected the change. Spreading into a new array fixes this.
Remove unused refreshTrigger from connect.component.ts. In download it
remains for file-action toggle (unrelated to p-tree).1 parent a51f720 commit c0ea5c6
2 files changed
Lines changed: 8 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
| 156 | + | |
| 157 | + | |
163 | 158 | | |
164 | 159 | | |
165 | 160 | | |
| |||
1306 | 1301 | | |
1307 | 1302 | | |
1308 | 1303 | | |
1309 | | - | |
1310 | | - | |
| 1304 | + | |
| 1305 | + | |
1311 | 1306 | | |
1312 | 1307 | | |
1313 | 1308 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
| 157 | + | |
| 158 | + | |
162 | 159 | | |
163 | 160 | | |
164 | 161 | | |
| |||
1094 | 1091 | | |
1095 | 1092 | | |
1096 | 1093 | | |
1097 | | - | |
1098 | | - | |
| 1094 | + | |
| 1095 | + | |
1099 | 1096 | | |
1100 | 1097 | | |
1101 | 1098 | | |
| |||
0 commit comments