Akryum / Akryum/floating-vue

Accept dom-node as prop

未關閉
#908 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
TypeScript
星號
3.5k
分支
341
平均合併
14 分鐘
30 天內合併 PR
8

描述

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

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。