geekhybrid / vue3-tree-vue

MIT License
63 stars 22 forks source link

Option remaining selected #29

Closed akbasferhat closed 8 months ago

akbasferhat commented 8 months ago

Hi,

When I select any option, the other options remain selected. image

Also some values appear as [object Object]. image

image image

geekhybrid commented 8 months ago

Thanks for reporting this. I'll have a look today.

geekhybrid commented 8 months ago

I wasn't able to reproduce this.

Can you update this project file with your code sample so we figure out why ? https://playcode.io/1799958

Also note I tested with the latest version. But feel free to update the package.json to your version and we can go from there.

akbasferhat commented 8 months ago

Hello, also i am using latest verision, here is my code sample

https://playcode.io/1800213

geekhybrid commented 8 months ago

Hello, also i am using latest verision, here is my code sample

https://playcode.io/1800213

Quickly had a look. The issue is your id field is not unique for each node. In way older versions you had to explicitly specify one. Now, you don't. If an id field exist we will use that else we generate a unique one. I removed all id fields and it worked as expected.

I'll leave this open for a day if you have any further feedback on the same issue, after which I will close.

akbasferhat commented 8 months ago

Thank you, it's my misunderstanding 👍