Retain the selected items of the wj-list-box items on navigation

Posted by: raj.ankathi on 11 October 2017, 11:22 am EST

  • Posted 11 October 2017, 11:22 am EST

    Hi Wijmo team,

    How can I retain the selected items of the wj-list-box items on navigating to a different route ( selecting the items and generating the report )? when I close the report view the multi-select view should have all the previous selections.

    I have created a shareable service and stored the selected items in an object by calling the (checkedItemsChange)="CheckItemIds($event,businessSegs,bsListBox).

    When I come back from the report view I do get the selected item data from the service as below

    t._rs.GetWijmoListBoxData$.subscribe((data: object) => {
                t.wijmoListBoxData = data;
            });
    

    inside the ```

    public CheckItemIds(e: any, controlName, listBox: WjListBox) { }

    and then patching the value to a FormGroup. 
    
    Please help
  • Posted 12 October 2017, 5:54 pm EST

    Hi,

    You should place Control for the main component instead of Routed component (Where router-outlet directive is placed). Or you can store selected values and assign back on view change.

    ~Manish

Need extra support?

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

Learn More

Forum Channels