How to embed Tree into Multiselect

edited February 4 in Technical questions

I need to embed Tree view into Multiselect view.
https://snippet.webix.com/3i6tbmtw
Problems:
1. The master object (Multiselect) does not receive the selected values from Tree at the click of a button "Select".
2. Initial values (value: '03,04') is selected into Tree view, but not checked. Which event should be handled to check initial value into tree?
3. How to template inputText of master Multiselect? If selected own id then its value, else - list of ids with separate symbol ','.

Thanks

PS: Is it possible to use this construct (multiselect+tree) as edit in Property view and datatable view?

Comments

  • edited February 10

    Hello @Natalya,

    1. The master object (Multiselect) does not receive the selected values from Tree at the click of a button "Select".

    You can handle the onItemCheck event of the multilist inside of the checksuggest and set the values to the multiselect control directly.

    2. Initial values (value: '03,04') is selected into Tree view, but not checked. Which event should be handled to check initial value into tree?

    Whether the item is checked or not is determined by the checked property of the said item. As a possibility, you can check if the value is currently set in the multiselect control and change the checked property in the multilist for the appropriate items.

    3. How to template inputText of master Multiselect? If selected own id then its value, else - list of ids with separate symbol ','.

    It is possible to assign a template to the multiselect input by specifying the template property of the inner suggest.

    Summing everything up, the end result would look something like this: https://snippet.webix.com/sxleuals.

  • @Dzmitry , hello.
    Thanks for the detailed answer and sample code. It's great.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!