fix(BlockEditor): preserve selected index only when block id and query match
This commit is contained in:
@@ -345,7 +345,7 @@ export default function BlockEditor({
|
|||||||
blockId,
|
blockId,
|
||||||
query,
|
query,
|
||||||
anchorRect: rect,
|
anchorRect: rect,
|
||||||
selectedIndex: prev?.blockId === blockId ? prev.selectedIndex ?? 0 : 0,
|
selectedIndex: (prev?.blockId === blockId && prev?.query === query) ? (prev.selectedIndex ?? 0) : 0,
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user