floating-vue
floating-vue copied to clipboard
Accept dom-node as prop
Hey there!
First of all, great library!
Currently we are using vanilla floating ui in one of our production apps. We want to include this vue wrapper, cause it reduces a lot of headache we have with the vanilla one.
One thing which is missing here is that the popover elements do not accept a custom DOM node as a prop.
See here
Sometimes you cant place the content in the Dropdown element. Like for example we are using quill, which is a wysiwyg editor. Quill uses just html elements in their editor which we want to wrap with a popover. For example when we click a link in the editor we need to render a popover at this position.
With the vanilla version this is possible, because you can just call the computePosition function with any DOM node like so:
const positionData = await computePosition(
(props.domNode as ReferenceElement) || contentRef.value,
popoverContainerRef.value,
{
strategy: 'fixed',
placement: props.position,
middleware: popoverMiddlewares.value,
},
);
Is there any possibility this could be possible in this wrapper library here?
Thanks in advance Blackfaded