Releases: bryanmylee/svelte-popperjs
Releases · bryanmylee/svelte-popperjs
Access the popper instance when creating popper actions!
If access is needed to the raw Popper instance created by the actions, you can reference the third element returned by createPopperActions
. The third element is a function that will return the current Popper instance used by the actions.
Using the raw Popper instance to manually recompute the popper's position.
<script>
import { createPopperActions } from 'svelte-popperjs';
const [popperRef, popperContent, getInstance] = createPopperActions();
async function refreshTooltip() {
const newState = await getInstance().update();
}
</script>
Tests were also added to ensure that no lifecycle leaks occur.