erhanfirat / combo-tree

ComboTree is a jQuery Plugin which is a combobox item with tree structured data list and multi/single selection options and more.
MIT License
79 stars 67 forks source link

Obey cascadeSelect configuration in setSelection() #51

Closed kshepherd closed 2 years ago

kshepherd commented 2 years ago

setSelection always finds child input elements and changes the checked property to true, even if cascadeSelect is false in the configuration. This causes some unexpected behaviour when the setSelection() method is used manually and only the exact node is expected to be selected.

This PR checks configuration first and if cascadeSelect is false, just changes the :first input element.

erhanfirat commented 2 years ago

Thanks for your improvement