Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tree]draggable属性不受控 #2797

Closed
jefferyol opened this issue Mar 14, 2024 · 4 comments
Closed

[Tree]draggable属性不受控 #2797

jefferyol opened this issue Mar 14, 2024 · 4 comments
Labels
enhancement New feature or request to be published fixed, not be published

Comments

@jefferyol
Copy link

tdesign-react 版本

1.5.2

重现链接

https://codesandbox.io/p/sandbox/tdesign-react-demo-vwycwz?file=%2Fsrc%2Fdemo.jsx&layout=%257B%2522sidebarPanel%2522%253A%2522EXPLORER%2522%252C%2522rootPanelGroup%2522%253A%257B%2522direction%2522%253A%2522horizontal%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522id%2522%253A%2522ROOT_LAYOUT%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522cltqn81so00073b6ohkeku8hj%2522%252C%2522sizes%2522%253A%255B70%252C30%255D%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522EDITOR%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522id%2522%253A%2522cltqn81so00033b6og4oxv98t%2522%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522SHELLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522id%2522%253A%2522cltqn81so00043b6oipx616ws%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522DEVTOOLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522id%2522%253A%2522cltqn81so00063b6ozhtj75un%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%252C%2522sizes%2522%253A%255B50%252C50%255D%257D%252C%2522tabbedPanels%2522%253A%257B%2522cltqn81so00033b6og4oxv98t%2522%253A%257B%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522cltqn81sn00023b6ohx6ggbo6%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522FILE%2522%252C%2522filepath%2522%253A%2522%252Fsrc%252Fdemo.jsx%2522%257D%255D%252C%2522id%2522%253A%2522cltqn81so00033b6og4oxv98t%2522%252C%2522activeTabId%2522%253A%2522cltqn81sn00023b6ohx6ggbo6%2522%257D%252C%2522cltqn81so00063b6ozhtj75un%2522%253A%257B%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522cltqn81so00053b6on7svp021%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522UNASSIGNED_PORT%2522%252C%2522port%2522%253A0%252C%2522path%2522%253A%2522%252F%2522%257D%255D%252C%2522id%2522%253A%2522cltqn81so00063b6ozhtj75un%2522%252C%2522activeTabId%2522%253A%2522cltqn81so00053b6on7svp021%2522%257D%252C%2522cltqn81so00043b6oipx616ws%2522%253A%257B%2522tabs%2522%253A%255B%255D%252C%2522id%2522%253A%2522cltqn81so00043b6oipx616ws%2522%257D%257D%252C%2522showDevtools%2522%253Atrue%252C%2522showShells%2522%253Atrue%252C%2522showSidebar%2522%253Atrue%252C%2522sidebarPanelSize%2522%253A15%257D

重现步骤

动态调整Tree的draggable属性,Tree始终为可拖拽状态

期望结果

Tree的拖拽功能受控,draggable属性生效

实际结果

Tree的拖拽功能不受控,draggable属性不生效

框架版本

No response

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

No response

Copy link
Contributor

👋 @jefferyol,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@jefferyol
Copy link
Author

抱歉,复现链接有点问题,更新如下
https://codesandbox.io/p/sandbox/tdesign-react-demo-forked-6k32q7?file=%2Fsrc%2Fdemo.jsx

@HaixingOoO HaixingOoO added the enhancement New feature or request label Mar 14, 2024
@jefferyol
Copy link
Author

jefferyol commented Mar 14, 2024

而且我拿到TreeNodeState看了一下,外层树开启了draggable,节点state上也没有挂载该属性值
image
image
也没有办法直接通过改节点state来控制单节点是否可拖动

@uyarn uyarn added the to be published fixed, not be published label Apr 9, 2024
@uyarn
Copy link
Collaborator

uyarn commented Apr 11, 2024

fixed 1.6.0

@uyarn uyarn closed this as completed Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request to be published fixed, not be published
Projects
None yet
Development

No branches or pull requests

3 participants