Component

Popover Frame

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 given id will be opened. An optional context for that instance may be provided. The popover frame should be positioned by the target element.
  • The grid.api.popoverFrameClose(id?) method will then close a popover frame with the given id.

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.