Angular 触摸时在芯片自动完成组件中显示下拉列表
我正在使用芯片自动完成组件,当我第一次触摸芯片自动完成组件时,它会显示下拉列表,如果 我从下拉列表中选择任何选项,然后再次触摸Chips Autocompletecomponent(芯片自动完成)字段,直到我们键入某些内容后,它才会显示下拉列表。我们不能更改此默认行为吗 还有一个问题是,如果我在搜索字段中键入某个内容并按enter键,它将在屏幕上显示该数据。我只想显示列表中的数据。这是链接。使用Angular 触摸时在芯片自动完成组件中显示下拉列表,angular,angular-material,Angular,Angular Material,我正在使用芯片自动完成组件,当我第一次触摸芯片自动完成组件时,它会显示下拉列表,如果 我从下拉列表中选择任何选项,然后再次触摸Chips Autocompletecomponent(芯片自动完成)字段,直到我们键入某些内容后,它才会显示下拉列表。我们不能更改此默认行为吗 还有一个问题是,如果我在搜索字段中键入某个内容并按enter键,它将在屏幕上显示该数据。我只想显示列表中的数据。这是链接。使用blur() selected(event: MatAutocompleteSelectedEve
blur()
selected(event: MatAutocompleteSelectedEvent): void {
this.fruits.push(event.option.viewValue);
this.fruitInput.nativeElement.value = '';
this.fruitCtrl.setValue(null);
this.fruitInput.nativeElement.blur()
}
使用blur()
selected(event: MatAutocompleteSelectedEvent): void {
this.fruits.push(event.option.viewValue);
this.fruitInput.nativeElement.value = '';
this.fruitCtrl.setValue(null);
this.fruitInput.nativeElement.blur()
}
尝试只放置可用的玩家:
尝试只放置可用的玩家:
这个问题我还需要一个帮助,这是新问题。你能回答这个问题吗<代码>https://stackoverflow.com/questions/52196269/to-display-the-dropdown-below-the-button-in-chips-autocomplete-component
这个问题我还需要一个帮助,这是新问题。你能回答这个问题吗<代码>https://stackoverflow.com/questions/52196269/to-display-the-dropdown-below-the-button-in-chips-autocomplete-component