question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

treeSelect don't have expand interface and can't control select expand and select

See original GitHub issue

What problem does this feature solve?

Custom treeNode select (as well as expand). Think about we don’t want to select parent node, but click to toggle show it’s children.

What does the proposed API look like?

const expandNode = (selectedKeys, e:{selected: bool, selectedNodes, node, event}) => {
  // some code to control tree expand
 // custom select expand, return false to prevent select hide
    return false
}
<TreeNode  onSelect={expandNode}>{xxx}</TreeNode>

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:7
  • Comments:13 (4 by maintainers)

github_iconTop GitHub Comments

8reactions
zombieJcommented, Apr 18, 2018

Since expandedKeys & selectedKeys can control now. It makes happened: https://codesandbox.io/s/9zv8y9ow4y

@Miced , you can adjust the logic for sample above : )

5reactions
andre-engelbrechtcommented, Apr 4, 2019

This kindof works on TreeSelect, except that the dropdown closes upon select. If only there was a way to prevent this then it would work. Any advice?

Read more comments on GitHub >

github_iconTop Results From Across the Web

3 controls on the tree - select, expand, open
We have a tree with one click to select and double click to expand. This works well for our users and is something...
Read more >
TreeSelect - Ant Design
Property Description Default allowClear Whether allow clear false bordered Whether has border style true defaultValue To set the initial selected treeNode(s) ‑
Read more >
Weldments - Creating a Custom Profile - SolidWorks Web Help
Under SOLIDWORKS Content , in the Weldments folder, Ctrl + click items to ... Open a new part. ... In the FeatureManager design...
Read more >
Help - iTOL
To expand a collapsed clade, click on it and select Expand clade from the node functions menu. iTOL also provides several functions for...
Read more >
Creating an Access Control Policy
Open Gateway Properties > Network Management. ... When Anti-Spoofing is selected and you click Get interfaces, the Security Gateway generates a list of ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found