Hi guys!
Please, check this example: https://snippet.webix.com/bk5ium4g
Scenario 1:
- Put a check mark next to ‘Camry’. You will see that a ‘dash’ mark will appear next to ‘Toyota’ and ‘Cars’ parent entries. Which is correct.
- Now type ‘corolla’ in search input. Now, that ‘Camry’ entry is no longer displayed, there will be no ‘dash’ mark next to ‘Toyota’ and ‘Cars’, because checkbox states are based on what is displayed, not on actual tree data. Which is not an expected behavior for me.
- Now, if you put a checkbox mark next to ‘Corolla’ entry, and do ‘tree.getChecked()’, you will only return ‘Corolla’ object as checked.
- Now, delete ‘corolla’ from search input. You will see that ‘Camry’ entry is still checked. Now if you do ‘tree.getChecked()’, you will get both ‘Corolla’ and ‘Camry’ objects as checked. Same output was expected in step 3, because despite ‘Camry’ entry was not displayed, it still WAS CHECKED.
Here is a screen record for you could better understand the steps: screencast-snippet.webix.com-2021.10.14-10_53_11 - Nimbus Capture
Scenario 2:
- Type ‘corolla’ in search input
- Now put a check mark next to ‘Corolla’ entry in tree
- You will see that a check marks are also being applied for ‘Toyota’ and ‘Cars’ parent entries. But the tree has ‘threeState: true’ option set, and ‘Toyota’ has other child entries besides ‘Corolla’ (which are currently not displayed), so it should be a ‘dash’ mark, not a check mark (same as ‘Cars’ has other child entries besides ‘Toyota’, so it also should be a ‘dash’ instead of a check mark).
Again, here is a screen record for you: screencast-snippet.webix.com-2021.10.14-11_00_35 - Nimbus Capture
So, this confirms that checkbox states are being calculated based on filtered results, not on actual tree data. Which seem to be an incorrect behavior from my point of view.
Anyway, my question is: can you advice some sort of a workaround here, for I could achieve a required behavior?
Thank you