Angular 5 - TreeView problems

Posted by: feniksreborn on 2 March 2018, 8:09 am EST

    • Post Options:
    • Link

    Posted 2 March 2018, 8:09 am EST

    Hello,

    Angular 5

    Typescript

    wijmo 5.20173.405

    I have next situation. Please go to Black Sabbat and choose Lady Evil, after that click edit names - here we have a problem that TreeView has collapsed.

    Now we try to select the node, that we have selected before edit action, please click “Select Node” - nothing …

    Can you please explain how to use TreeView control and get described behavior?

    I have made a plunker example.

    I know that I have the new reference to action “Edit”, but this is new service.

    http://plnkr.co/edit/SXdh8JduZBIyf1Ge66dc?p=preview

    Plase HELP

  • Posted 5 March 2018, 5:14 am EST

    Hi,

    Any suggestion on this issue?

    Thank you

  • Posted 5 March 2018, 6:07 am EST

    Hi,

    I need some time to investigate this. I will get back to you on this tomorrow.

  • Posted 8 March 2018, 5:57 am EST

    Hi,

    On clicking the edit names button,the tree view is losing selection because you are changing its source(not recommended).

    However if there is requirement to change the item source and retain selection you can refer this updated fiddle.

    Hi,

    On clicking the edit names button,the tree view is losing selection because you are changing its source(not recommended).

    However if there is requirement to change the item source and retain selection you can refer this updated fiddle.

    http://plnkr.co/edit/Z4Vty2LKmvzlCTfOb02G?p=preview

  • Posted 8 March 2018, 9:33 am EST

    Hello,

    Waiting has paid off. Thank you very much, Sir. You made my day.

    I have one more question for you. How to recognize the difference if I have for example the item “Lady Evil” 3 times in the list. For example: Please go to Black Sabbat /Heaven and Hell and choose the second Lady Evil. Click on edit, the first Lady Evil will be selected - it should be the second one.

    Here is the plunker: http://plnkr.co/edit/SKCrp8AWQmKFxOifczCN?p=preview

    Thank You

  • Posted 9 March 2018, 6:42 am EST

    Hi,

    I think the best way would be to add a unique identifier to the DataSource for each item like an ID, so that we can know the exact node being selected and then re-select it based on the ID.

    If you need a sample let me know, I will try to give it you on Monday

  • Posted 9 March 2018, 7:20 am EST

    Hi,

    Semple will be good. I will wait till Monday.

    Thank you

  • Posted 11 March 2018, 11:07 pm EST

  • Posted 12 March 2018, 5:01 am EST

    Thank you!

    Work like a charm.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels