matsura / ng2-dual-list-box

A dual list box component for Angular 4
http://ng2-duallistbox-demo.surge.sh/
28 stars 20 forks source link

How to programmatically reset the list of selected items #9

Closed ReneIllger closed 7 years ago

ReneIllger commented 7 years ago

Is it possible to reset the list of selected items? I use the list in a reactive form and i used this.form.controls['selectedValues'].setValue([""]); to reset the list. The underlying array set to an empty array but the left column in the component is still showing the values.

Thanks in advance for helping.

matsura commented 7 years ago

@ReneIllger I didn't understand clearly. When you clear your form control, the right column is cleared, and the values should be returned to the left box(available items). What is the problem exactly?

matsura commented 7 years ago

Closed due to no response.

burstfour commented 6 years ago

Hello @matsura I have the same issue too. The values still not returned to the left box even if I already called reset() to reset the reactive form.