Popover
Description
The Popover (shared between all DataGridXL instances) is the "tooltip" that appears when hovering over a data grid cell. For instance, if the cell contains a URL, a popover opens with a preview image of the given URL.
Usage
The DataGridXL class has a static property popover.
javascript
// create DataGridXL instance
const grid = new DataGridXL(...);
// work with the shared Popover instance
grid.constructor.popover.isOpen();
grid.constructor.popover.events.on('show', ...);NOTE: You don't need to create a Popover instance yourself — it is provided by the grid automatically.Methods
close()Close popover
Fires
$closeisOpen(): booleanCheck if popover is open
Returns
booleanReturns `true` if popover is open, otherwise `false`.open(bounds, popoverPosition?, minWidth?)Open popover
Arguments
bounds
BoundsTarget bounds in pixels `{ top, right, bottom, left }`popoverPosition?
stringdefault "bottom-left"Position of popover, such as `"bottom-left"`minWidth?
numberdefault 20Minimum popover width in pixelsFires
$beforeopen$openEvents
closePopoverEventFires when popover closes
Payload
typestringType of the event (e.g. 'dblclick', 'contextmenu')
targetPopoverInstance that fired the event
mouseenterPassthroughEventFires when mouse enters popover
Payload
typestringEvent name (e.g. 'copy', 'paste')
targetobjectInstance that fired the event
nativeEventEventThe original DOM event
mouseleavePassthroughEventFires when mouse leaves popover
Payload
typestringEvent name (e.g. 'copy', 'paste')
targetobjectInstance that fired the event
nativeEventEventThe original DOM event
beforeopenPopoverOpenEventFires before popover opens
Payload
typestringAlways `"beforeopen"` or `"open"`
targetPopoverInstance that fired the event
payloadPopoverOpenEventPayloadStructured event data
openPopoverOpenEventFires when popover opens
Payload
typestringAlways `"beforeopen"` or `"open"`
targetPopoverInstance that fired the event
payloadPopoverOpenEventPayloadStructured event data