mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: bugs
This commit is contained in:
parent
d4c5180761
commit
e5fd455e93
@ -75,19 +75,20 @@ function OutlineItem({ view, level = 0, width }: { view: PublishViewInfo; width:
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const children = view.child_views || [];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={'flex h-fit flex-col'}>
|
<div className={'flex h-fit flex-col'}>
|
||||||
{renderItem(view)}
|
{renderItem(view)}
|
||||||
<div
|
<div
|
||||||
className={'flex transform flex-col gap-2 transition-all'}
|
className={'flex transform flex-col gap-2 transition-all'}
|
||||||
style={{
|
style={{
|
||||||
height: isExpanded && view.child_views?.length ? 'auto' : 0,
|
display: isExpanded ? 'block' : 'none',
|
||||||
opacity: isExpanded && view.child_views?.length ? 1 : 0,
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{view.child_views
|
{children
|
||||||
?.filter((view) => view.layout === ViewLayout.Document)
|
.filter((view) => view.layout === ViewLayout.Document)
|
||||||
?.map((item, index) => (
|
.map((item, index) => (
|
||||||
<OutlineItem level={level + 1} width={width} key={index} view={item} />
|
<OutlineItem level={level + 1} width={width} key={index} view={item} />
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user