ant-design DirectoryTree does not forward defaultExpandParent

guz6ccqo  于 2022-11-19  发布在  其他
关注(0)|答案(3)|浏览(231)

Steps to reproduce

Open the page and see that it does not use defaultExpandParent and defaults to true instead false .

What is expected?

defaultExpandParent is forwarded. See https://github.com/ant-design/ant-design/blob/master/components/tree/DirectoryTree.tsx#L216.

What is actually happening?

defaultExpandParent is not forwarded.

EnvironmentInfo
antd4.19.5
React17.0.2
SystemMacOs
BrowserChrome
50few1ms

50few1ms2#

Didn't find anything went wrong in your reproduction, could you provide more description?

dpiehjr4

dpiehjr43#

I seem to have forgotten to save the sandbox. It should be up to date now. You should see two identical trees where the only difference is that one is a Tree and the other a DirectoryTree . The trees contain a deeply nested expanded node, but I would expect both to not expand its parents.

Let me know if you need more details.

相关问题