这是indexloc提供的服务,不要输入任何密码
Skip to content

Custom sticky header and footer for popover and tray #3020

@jsgiant

Description

@jsgiant

🙋 Feature Request

We have a use case where we need to add a sticky footer without affecting the Listbox layout and scroll. We've explored the useListboxLayout and some other hooks that are involved in layout. But didn't help us. Is there any specific thing that we can use for our use case? Thanks!

🤔 Expected Behavior

Should be able to add a sticky header and footer in the popover and tray without affecting the layout of the Listbox.

😯 Current Behavior

💁 Possible Solution

A custom item or type of node can be added where we can use it to add a custom header or footer and it shouldn't affect the current layout structure and calculation of the layout dimensions.

🔦 Context

💻 Examples

You can see our use case in the below sandbox:

https://codesandbox.io/s/react-spectrum-listbox-usecase-oztcyl?file=/src/App.tsx:0-34

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions