stf-vue-select icon indicating copy to clipboard operation
stf-vue-select copied to clipboard

Selection options not scrolling smoothly

Open VK-Wolland opened this issue 6 years ago • 5 comments

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

VK-Wolland avatar Apr 01 '19 09:04 VK-Wolland

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

AndreySyagrovskiy avatar Apr 19 '19 08:04 AndreySyagrovskiy

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.

VK-Wolland avatar Apr 19 '19 09:04 VK-Wolland

@VK-Wolland could you help me with it?

AndreySyagrovskiy avatar Apr 19 '19 09:04 AndreySyagrovskiy

@AndreySyagrovskiy I'll see what I can do.

VK-Wolland avatar Apr 19 '19 11:04 VK-Wolland

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); },

AndreySyagrovskiy avatar Apr 19 '19 12:04 AndreySyagrovskiy