1
我已经与这个好几天了。我无法更新与去抖动md-autocomplete
我有一个自定义的MD-自动填充组分: “@角/芯”: “4.2.6”, “@角/材料”: “2.0.0-beta.8”,
在最后一次按键通过'n'秒后,我需要延迟服务呼叫。一切都与莫克日期没关系,但是,当我有点从服务延迟。繁荣!!!!该列表不会出现。
filterAutocomplete() {
this.filteredOptions = this.autocompleteControl.valueChanges
.startWith(null)
// delay
.debounceTime(this.autoProperties.time)
// call service method
.map(textSearch => this.FilterList(textSearch))
// unique event
.distinctUntilChanged();
}
FilterList(textSearch: string): any[] {
this.ref.detectChanges();
this.searchEmiter.emit(textSearch ? textSearch : '');
return this.listReg;
}
this.filteredOptions
用于
this.FilterList
启动事件画列表的视图中的父亲,有来电的服务。然后,用参数发送给md-autocomplete更新对象
我试过用this.changeDetectorRef.detectChanges()
但是不更新。
感谢