mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-11-09 14:03:33 +09:00
Merge pull request #145 from rpominov/fix-tree-flicker
Fix tree flicker
This commit is contained in:
1 file changed
+2
-2
@@ -64,7 +64,7 @@ export const Tree = ({
|
||||
instance.children.length > 1 || typeof instance.children[0] === "object";
|
||||
|
||||
const children = useMemo(() => {
|
||||
if (isOpen === false || showChildren === false) {
|
||||
if ((isOpen === false && animate === false) || showChildren === false) {
|
||||
return null;
|
||||
}
|
||||
const children = [];
|
||||
@@ -127,7 +127,7 @@ export const Tree = ({
|
||||
<Text>{label}</Text>
|
||||
</Button>
|
||||
</Flex>
|
||||
<CollapsibleContent>{children}</CollapsibleContent>
|
||||
{children != null && <CollapsibleContent>{children}</CollapsibleContent>}
|
||||
</Collapsible.Root>
|
||||
);
|
||||
};
|
||||
Reference in new issue
Block a user