trackBy with dropdown #2669
Unanswered
tim-wilkins
asked this question in
PrimeNG
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've tried using the virtualScrollOptions for the dropdown and setting the trackBy value to point to a suitable function but this function isn't being called. How do I do this? This is my attempt, but I don't get the logging to console. This is to work-around the jumping backwards bug and trackBy works well for that elsewhere, but I've not tried virtual scrolling with a dropdown before. appendOnly also avoids the bug and does work here, but I'd prefer the other fix.
public virtualScrollOptions : ScrollerOptions = {
appendOnly: true,
trackBy: this.trackBy
};
public trackBy(index: number): number {
console.log('trackBy');
return index;
}
Beta Was this translation helpful? Give feedback.
All reactions