fedorovvvv / svelte-floating-ui

Svelte✨ Floating UI 🎈
MIT License
151 stars 8 forks source link

Infinite onComputed loop with `hide` middleware #8

Closed harshmandan closed 1 year ago

harshmandan commented 1 year ago

Hi,

I'm trying to recreate this example in svelte, using onComputed, but whenever the reference element goes out of the view the onComputed loop keeps running.

So my question is if this is normal or expected or if it is a bug? Also, what is the proper way to use the hide middleware if I'm using it wrong?

Here's the demo REPL: https://svelte.dev/repl/2db64b10d18a4740b81ff707978727bb?version=4.0.4

fedorovvvv commented 1 year ago

Hi!✨ Unfortunately, this is how autoUpdate works in the floating ui There is nothing we can do about it :(

REPL: https://svelte.dev/repl/e0b47f63f4ce4cc2a44440afce86a206?version=4.0.4

harshmandan commented 1 year ago

Oh okay, thanks!