Closed TheRolfFR closed 1 year ago
@TheRolfFR this should do the trick...
<script>
import Select from 'svelte-select';
let items = ['One', 'Two', 'Three'];
let floatingConfig = {autoUpdate: true}; // just need to add this.
</script>
<Select {items} {floatingConfig} />
https://svelte.dev/repl/f7aa566557df476ba6c1ba9c4d6cd2f2?version=3.55.0
Hello, Thanks for your component, very easy to use with great doc and examples.
I have a searchable select and when i focus it when the item is positioned at the bottom of the screen, the options open on the top:
But as the results decrease with search, the top position of the options are not computed, and appear "floating":
![image](https://user-images.githubusercontent.com/18086786/209865114-eff78055-05f4-4879-a745-498540da4279.png)
I don't think it is very complicated, just watch for changes in displayed items length, and you can recompute the said top position. Maybe extracting the function and recalling it, I didn't check the code yet.
If you want to try it by yourself, just try it on the page https://beta.faithfulpack.net/add-ons.
Thanks!