Configurator API
The built-in configurator can be used through PivotPlugin, but it is also available as a standalone API. Use this when you want the field panel in a custom shell, sidebar, or framework-managed layout.
Main Entry Point
Section titled “Main Entry Point”import { definePivotConfigurator } from '@revolist/revogrid-enterprise';definePivotConfigurator(el, config, actions) mounts the configurator into any element.
Example
Section titled “Example”definePivotConfigurator(container, pivotConfig, { onUpdateColumns: (columns) => { pivotConfig = { ...pivotConfig, columns }; }, onUpdateRows: (rows) => { pivotConfig = { ...pivotConfig, rows }; }, onUpdateValues: (values) => { pivotConfig = { ...pivotConfig, values }; },});PivotConfigurationActions
Section titled “PivotConfigurationActions”The current callback surface is:
onUpdateColumnsonUpdateRowsonUpdateValues
These callbacks receive the new ordered configuration for the edited zone.
What The Configurator Does Not Own
Section titled “What The Configurator Does Not Own”The configurator does not:
- execute Pivot by itself
- persist state for you
- own the grid instance
It is purely a configuration UI. You decide where the updated state goes next.
Embedded Via PivotPlugin
Section titled “Embedded Via PivotPlugin”When hasConfigurator is enabled on PivotConfig, PivotPlugin internally uses the same standalone configurator surface and wires it to pivot-config-update.
That means:
- standalone usage and plugin-managed usage stay conceptually aligned
- examples built around the standalone API still apply to plugin-managed usage
Visibility And i18n
Section titled “Visibility And i18n”The configurator reads:
showRowsshowColumnsshowValuesi18n
These options let you tailor the panel for a simpler or more controlled layout.
Best Practices
Section titled “Best Practices”- Keep the configurator state source-of-truth in one place, usually the same state object you pass to the grid.
- Provide stable
dimensionsmetadata so labels and aggregators stay consistent. - Persist the resulting
PivotConfigrather than trying to persist the configurator UI separately.