Popover Frame
Learn how to implement and use dialog frames in LyteNyte Grid to create accessible modal interfaces in your grid applications.
LyteNyte Grid PRO lets you open popovers on demand, but leaves the actual UI to your chosen component library. This prevents bundling multiple popover libraries into the same application.
How It Works
Register a popover frame on the grid using the popoverFrame property. Open a popover with:
grid.api.popoverFrameOpen(id, target, context?). The popover frame with the givenidwill be opened. An optional context for that instance may be provided. The popover frame should be positioned by thetargetelement.- The
grid.api.popoverFrameClose(id?)method will then close a popover frame with the givenid.
LyteNyte Grid manages the popover state, while the developer is responsible for the rendering using their provided library.
The example below uses the popover component from Base UI to display popovers next to cells when they are clicked.
Popover Frame
Why Use the Grid's Popover Frame?
The key advantage is context management. Defining dialogs at the grid level means:
- You can open popovers directly from grid components (e.g., cell renderers) with the right context.
- You avoid building custom state management or using React Context for popover coordination.
- You focus on popover rendering while the grid handles orchestration.
This approach simplifies integration and ensures popovers work seamlessly with grid-level state and interactions.