How to clear ng-select selection

前端 未结 8 1293
孤街浪徒
孤街浪徒 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:59

    Like @tim answer is correct but I will prefer you set as an empty array instead of null just to save any loop break.

    this.selectedCalculation = [];
    

提交回复
热议问题