Open CrendKing opened 10 months ago
Hiii✨
You may be able to dynamically update autoUpdate
via update
Example:
$: update({
autoUpdate: showTooltip
})
Thank you! According to the type definition, UpdatePosition
specifically doesn't take autoUpdate
, right? I tested your snippet and it does not work.
On the other hand, if I update(onComputed: () => {})
, it no longer executes the old real onComputed
, but still, this empty function is executed hundreds of times every time user scrolls, which is suboptimal.
It's weird😥 I'll try to fix that in future versions, thanks🙏
It will be necessary to stop autoUpdate at destroy
In this demo, I have a button that triggers a floating tooltip when mouse enter, and remove the tooltip when mouse leave. Obviously I want the
onComputed()
to run when the tooltip is showing. However, there doesn't seem to be an easy way to turn it off on-demand when the tooltip is hidden. As a result, you can see the console message keeps printing.I know you mentioned in https://github.com/fedorovvvv/svelte-floating-ui/issues/8 that
autoUpdate()
is unavoidable when the tooltip is out of view. But what I'm asking is a way to completely reset the whole floating-ui back to before the first call tofloatingContent()
.Or is this request more appropriate for the upstream?