return this.listName.filter((x: any) => x.name.toLowerCase().startsWith(SelectedList.toLowerCase()))
尝试
this.listName = this.listName.filter((x: any) => x.name.toLowerCase().startsWith(SelectedList.toLowerCase()))
ngOnInit(){
const response = this.getData();
this.completeList = responsee;
this.listName = this.completeList;
}
然后
SetValue(SelectedList:string) {
this.inputField.nativeElement.value= SelectedList
this.divVisible = false;
this.listName = this.completeList.filter((x: any) => x.name.toLowerCase().startsWith(SelectedList.toLowerCase()));
}