fix: zindex test

This commit is contained in:
Mark Tolmacs committed 2026-12-04 09:34:57 +00:00
1 parent f163587a01
commit 1e4314fe9f
1 file changed
+7 -7
@@ -89,9 +89,12 @@ const populateElements = (
},
);
// initialize `boundElements` on containers, if applicable
API.setElements(
newElements.map((element, index, elements) => {
// Set the elements and the selection in one update: rendering in between
// would pair the new elements with the previous selection, which can point
// at elements that are now deleted
act(() => {
// initialize `boundElements` on containers, if applicable
h.elements = newElements.map((element, index, elements) => {
const nextElement = elements[index + 1];
if (
nextElement &&
@@ -104,10 +107,7 @@ const populateElements = (
};
}
return element;
}),
);
act(() => {
});
h.setState({
...selectGroupsForSelectedElements(
{ ...h.state, ...appState, selectedElementIds },