cancel
Showing results for 
Search instead for 
Did you mean: 

Error with search component in ADF

abbask01
Star Collaborator
Star Collaborator

I'm trying to use adf-search in my component. but it gives me below error in console. i've used the example given in catalog for customized search result. i use adf-2.6.1

Regards,
Abbas
3 REPLIES 3

spino
Confirmed Champ
Confirmed Champ

Hi,

can i see the implementation of the component inside the template UserSelectorComponent.html?

abbask01
Star Collaborator
Star Collaborator

Hi,

UserSelectorComponent.html

<adf-search [searchTerm]="searchTerm">
<ng-template let-result>
<ul>
<li *ngFor="let item of result?.list?.entries">
{{ item?.entry.name }}
</li>
</ul>
</ng-template>
</adf-search>

UserSelectorComponent.ts

import { Component, OnInit } from '@angular/core';

@Component({
selector: 'aca-user-selector',
templateUrl: './user-selector.component.html',
styleUrls: ['./user-selector.component.scss']
})
export class UserSelectorComponent implements OnInit {

searchTerm = "abb";

constructor() { }

ngOnInit() {
}
}
Regards,
Abbas

spino
Confirmed Champ
Confirmed Champ

I've tried your implementation on my adf,

and it works. 

I advice you to update your adf version to 3.1.0,

but it seems like it is a dependency problem,

have you already tried to re-run "npm install" ?