ng-multiselect-dropdown
ng-multiselect-dropdown copied to clipboard
unable to bind new data fetched from api on onFilterChange event.
I'm not able to bind new data fetched from api on onFilterChange event. my requirement is, I want to bind 1st 100 records and if search string does not match with any record out of 100, I want to bind next 100 records from api. but this is not happening. please help me with this scenario. template code: <ng-multiselect-dropdown [data]="entity" (onFilterChange)="onFilterChange($event)">
onFilterChange(searchText: string) {
this.http.getData(searchText).subscribe(data=> this.entity=data);
}
Originally posted by @NileshPatel17 in https://github.com/NileshPatel17/ng-multiselect-dropdown/issues/185#issuecomment-559960468
@dipaliwagh30 here is the solution. Not sure if i understood your use case correctly. Its bit unusual use case. let me know what do you think..
https://codesandbox.io/s/v0-3-8-1vkmo?file=/src/app/app.component.ts
You need to clear search text manually to see binded new items.
here is the preview.
https://user-images.githubusercontent.com/27020381/151221075-c7b84cde-d70a-41dc-b015-da4682e76330.mp4
@NileshPatel17 , it worked for me. just one more use case I need.
is there any way where we can fire a scrollToEnd event when scrollbar touches at the end of list and fire some event. if there is any solution for this, could you please help me with that.
Thank you so much for replying on the issue I reported. :)
@NileshPatel17 , it worked for me. just one more use case I need.
is there any way where we can fire a scrollToEnd event when scrollbar touches at the end of list and fire some event. if there is any solution for this, could you please help me with that.
@dipaliwagh30 There is no such event to handle it as of now.