🐛 Expand folded combos that gain changed elements

setData merges datum props by id on a live G6 instance, so omitting style.collapsed retained a previous true: with "fold unchanged" on, a change inside a folded combo pulsed but never expanded it. Write the boolean explicitly both ways.

Signed-off-by: Álvaro Tejero Cantero <alvorithm@teje.ro>
This commit is contained in:
Álvaro Tejero Cantero 2026-07-16 18:43:50 +02:00
parent b6d34a0a97
commit 661eeb7dfd
No known key found for this signature in database

View File

@ -703,7 +703,11 @@ Graph Console
const combo = { id: comboIdFor(n.id), data: { label: n.label, table: n.table } };
const p = parentOf[n.id];
if (p && hasCombo[p]) combo.combo = comboIdFor(p);
if (collapsedIds && collapsedIds.has(combo.id)) combo.style = { collapsed: true };
// Explicit boolean both ways: setData merges datum props by id on a
// live instance, so omitting `collapsed` would retain a previous
// `true` — a change inside a folded combo could then never expand it
// (the fold-unchanged bug).
combo.style = { collapsed: !!(collapsedIds && collapsedIds.has(combo.id)) };
combos.push(combo);
});
const g6nodes = nodes.map(function (n) {