grapoza / vue-tree

Tree components for Vue 3
MIT License
95 stars 12 forks source link

Single selection mode does not work with customised id property name #297

Closed luckyrat closed 1 year ago

luckyrat commented 1 year ago

Here: https://github.com/grapoza/vue-tree/blob/master/src/composables/selection/treeViewSelection.js#L105

The comparison is hardcoded to use the "id" property rather than the one that was configured to be used instead. Thus, the "old" selection is never removed.

grapoza commented 1 year ago

D'oh. I'll get that fixed this weekend.

grapoza commented 1 year ago

@luckyrat I've published 5.1.0, which contains this fix among some other change that were ready to go.

luckyrat commented 1 year ago

Thanks for the quick fix. I can confirm I've tested 5.1.0 and it's working now with my custom id property.