Skip to content

[✨] Make Popover work without using a div #961

Open
@imMadsen

Description

Is your feature request related to a problem?

The issue is when using a Popover for a Context Menu in a table, the Popover.Root element wraps the contents in a div. Essentially making it unusable for tables. Maybe my examples below can help clarify the issue

Example

<table>
    <Popover.Root>
        <tr>
            <td>John Doe</td>
        </tr>
        <Popover.Panel id="my cool menu">
        </Popover.Panel>    
    </Popover.Root>
</table> 

Example (Rendered)

<table>
    <div>
        <tr>
            <td>John Doe</td>
        </tr>
        <div id="my-cool-ctx-menu">
        </div>
    </div>
</table> 

Describe the solution you'd like

Dream Scenario (Rendered)

<table>
    <tr>
       <td>John Doe</td>
       <div id="my-cool-ctx-menu">
       <div>    
    </tr>
</table> 

Describe alternatives you've considered

Maybe use a Polymorphic components like described in the Qwik Documentation here, or maybe one could use a fragment (I assume this is not done cause of some dom requirements stuff)

Additional context

No response

Metadata

Assignees

No one assigned

    Labels

    COMMUNITY: PR is welcomedWe think it's a good feature to have but would love for the community to help with the PR for itTYPE: enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions