Error with search component in ADF

cancel
Showing results for 
Search instead for 
Did you mean: 
abbask01
Senior Member

Error with search component in ADF

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
spino
Active Member II

Re: Error with search component in ADF

Hi,

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

abbask01
Senior Member

Re: Error with search component in ADF

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
Active Member II

Re: Error with search component in ADF

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" ?