Skip to content
New issue

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

Selection options not scrolling smoothly #19

Open
VK-Wolland opened this issue Apr 1, 2019 · 5 comments
Open

Selection options not scrolling smoothly #19

VK-Wolland opened this issue Apr 1, 2019 · 5 comments

Comments

@VK-Wolland
Copy link

VK-Wolland commented Apr 1, 2019

When you put stf-select in b-modal(bootstrap vue modal) and try to scroll the modal with options opened options container not scrolling smoothly.
Also, I tried it without modal and then it works fine.

Sample:
https://gist.github.com/VK-Wolland/ed39c6890a644c94e53758c01468c6a2

On the screen options overlap with input and hide it
Screen:
Stf

@AndreySyagrovskiy
Copy link
Contributor

Hi @VK-Wolland

I see what you but it works as designed. Options' container is out of the select box container to prevent the situation with overflow: hidden;
But we should calculate the position of options` container to show at the select box.
Without b-modal position is not changed and scroll looks smoothly and it is not smooth in b-modal.
And there is an optimization of the position calculation that why it is not smooth.
But how often do you scroll page with opened options? And Is it as important as battery life and page performance?

Kind regards,
Andrii

@VK-Wolland
Copy link
Author

Hi @AndreySyagrovskiy ,
Thanks for your response.
I understand this is not common use case, but honestly would you use app that behave like this?
I understand your arguments, but could you add some property that would turn off this optimization and enable smooth scroll?
Than, developers can decide by themselves when to turn it on.

@AndreySyagrovskiy
Copy link
Contributor

@VK-Wolland could you help me with it?

@VK-Wolland
Copy link
Author

@AndreySyagrovskiy I'll see what I can do.

@AndreySyagrovskiy
Copy link
Contributor

AndreySyagrovskiy commented Apr 19, 2019

Thank you! @VK-Wolland

You can try to change this part

_addwidowScrollListener() { const vm = this; this._runOnScroll = throttle(function(evt) { vm._calculatePositionAnsSize(); }, 100); window.addEventListener('scroll', this._runOnScroll, true); },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants