dipson88 / treeselectjs

Treeselect on vanilla JS
MIT License
83 stars 15 forks source link

Nested search support #103

Open peterchenadded opened 4 months ago

peterchenadded commented 4 months ago

Seems treeselectjs is not handling nest searches correctly.

Below is an example:

Options:

Search input: China

I click on the Asia option.

Actual: Asia option is selected Expected: Asia is partially selected and China is selected

Note: this fix looks easier than it is because of the nested nature of the tree. There has to be recursive logic to make sure checked and isPartialChecked flags of flat options are correctly set.

Can someone make the change to support this or want me to create a PR?