We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug
If you have a typeahead present the scrollToEnd is fired even before you reach the bottom of the options.
Reproducbile example StackBlitz which reproduces described behaviour
To Reproduce Steps to reproduce the behavior (if example is not provided):
Open the dropdown (It loads with a set of options)
Scroll down to the 2nd option
Now type something in the search box, you will see that after the typeahead subject emits a value the scrollToEnd event is fired as well
Expected behavior ScrollToEnd should only fire if the user has reached the end of the list. Not when the list is reset or updated
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered:
@neil-coutinho Thanks for a good catch. This happens because after you scrolled to to second item ng-select checks if last item is reached and as you later type in search and only few items are visible it fires that event. Probably the simplest fix would be to reset fire to end flag if items changed https://github.com/ng-select/ng-select/blob/master/src/ng-select/ng-dropdown-panel.component.ts#L122
Sorry, something went wrong.
fix: don't fire scroll to end when scrollTop = 0
af73f7c
fixes #1018
c2b094e
We're seeing that with this change we're not seeing the event being fired due to a rounding issue.
Thoughts on rounding up here?
if (ceil(scrollTop + this._dropdown.clientHeight) >= padding.clientHeight) { ... }
any updates?
i have faced this same issue how to solve it.
No branches or pull requests
Describe the bug
If you have a typeahead present the scrollToEnd is fired even before you reach the bottom of the options.
Reproducbile example
StackBlitz which reproduces described behaviour
To Reproduce
Steps to reproduce the behavior (if example is not provided):
Open the dropdown (It loads with a set of options)
Scroll down to the 2nd option
Now type something in the search box, you will see that after the typeahead subject emits a value the scrollToEnd event is fired as well
Expected behavior
ScrollToEnd should only fire if the user has reached the end of the list. Not when the list is reset or updated
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: