How to clear ng-select selection

前端 未结 8 1252
孤街浪徒
孤街浪徒 2021-02-19 07:21

Is it possible to programmatically clear the selection of an ng-select dropdown? I\'m wanting the equivalent behaviour of clicking the clear icon, but triggered programmatically

8条回答
  •  太阳男子
    2021-02-19 07:44

    I was looking for the same but for templates to invoke it outside ng-select. So, the below worked fine for me following the accepted answer. ^_^

    
    
    
    
    

    This also makes sure the resetCalculations() being called.

提交回复
热议问题