Angular 7: Clear selection with x-button on a dropdown box

后端 未结 2 2365
醉酒成梦
醉酒成梦 2021-02-20 13:29

I thought I can combine the examples from Angular for dropdown and the Input with clear box to:


  

        
2条回答
  •  清歌不尽
    2021-02-20 14:08

    (click)="selectedCountry=undefined; $event.stopPropagation()" helped! Thx to @Sachila :-)

    So the full code looks like:

      

提交回复
热议问题