ycs77 / headlessui-float

Easily use Headless UI with Floating UI to position floating elements.
https://headlessui-float.vercel.app
MIT License
348 stars 13 forks source link

portal connection render for DOM elements #113

Closed d90375 closed 5 months ago

d90375 commented 5 months ago

Is your feature request related to a problem? Please describe. Improvement : Performance leak

use case: Table (a lot of cells that use tooltip) When we use original <table> <tr> (default browser behaviour) element we should use portal otherwise it will overflowed image portal property create DOM element for each float element image

Describe the solution you'd like How it can be improved ? for example: create portal connection to Float only if element show, or create just one portal that can be connect for each Float

Describe alternatives you've considered ^_

d90375 commented 5 months ago

hey @ycs77 do you have any idea how it would be optimised ?

ycs77 commented 5 months ago

Hi @d90375, sorry I have no current plans to resolve this issue.

I created this package to float the Headless UI component quickly, and non-invasive to the Headless UI, just supported floating the basic usage for the Headless UI example. This change will increase the complexity of this package.

So if you want to use the tooltip, I suggest using Tippy.js (or react-tippy, vue-tippy).