tree-select icon indicating copy to clipboard operation
tree-select copied to clipboard

Can I change the TreeSelect props on the fly?

Open Al-JeMay opened this issue 4 years ago • 1 comments

Can I change the TreeSelect props on the fly? For example, I wanted to have 2 modes for this component, so user can freely switch between TreeSelect.SHOW_ALL and TreeSelect.SHOW_PARENT. From my understanding, I need to change the props of showCheckedStrategy & treeCheckStrictly to make this happen. Any Idea on how to dynamically change this two props?

MODE 1 : Select only parent showCheckedStrategy = TreeSelect.SHOW_PARENT treeCheckStrictly = true image

MODE 2: Select parent and all its children showCheckedStrategy = TreeSelect.SHOW_ALL treeCheckStrictly = false image

Al-JeMay avatar Jun 01 '21 06:06 Al-JeMay

I managed to solve it; those two props are dynamically changeable :)

Al-JeMay avatar Jun 01 '21 08:06 Al-JeMay