vue-treeselect icon indicating copy to clipboard operation
vue-treeselect copied to clipboard

individual selection on parent nodes

Open naiduyanda opened this issue 3 years ago • 5 comments
trafficstars

Hi,

I have a parent node, some of which nodes are not to be selected on parent selection. but I should be able to select individually. Is there any way for this?

naiduyanda avatar Dec 14 '21 16:12 naiduyanda

If I understand here is the demo of what you need: https://vue-treeselect.js.org/#more-features

TitanFighter avatar Dec 17 '21 21:12 TitanFighter

Hi, Thanks for the reply

actually, this is not what I need, suppose A is group and having a child (1,2,3,4),

one of the children 3 should be selected individually, on clicking A this 3 shouldn't be selected.

naiduyanda avatar Dec 18 '21 06:12 naiduyanda

one of the children 3 should be selected individually, on clicking A this 3 shouldn't be selected.

Sorry, I do not understand it. Do you mean that on clicking A just 3 must be selected or just 1,2,4? or do you mean that you want to select just 3, then on clicking A you want to select 1,2,4 + deselect 3?

TitanFighter avatar Dec 20 '21 15:12 TitanFighter

on clicking on A 1,2,4 should be selected, and 3 shouldn't be selected

naiduyanda avatar Dec 21 '21 03:12 naiduyanda

The simplest way I can come up right now is to let Treeselect select all children (1,2,3,4), this fires "select" event which you can listen and then you can deselect 3.

Another option (probably), do not use "v-model", use :value="yourValues" + events, so you can handle yourValues as you need yourself.

TitanFighter avatar Dec 21 '21 13:12 TitanFighter