Akryum / Akryum/floating-vue

Accept dom-node as prop

Abierto
#908 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
TypeScript
Estrellas
3.5k
Forks
341
Merge medio
14 min
PR fusionados (30 d)
8

Descripción

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](https://github.com/Akryum/floating-vue/blob/main/packages/floating-vue/src/components/PopperWrapper.vue#L19)
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:

```ts
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

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.