# Configurator Customization

The KendoReact `PivotGridConfigurator` component is responsible for providing an end-user interface for configuring the `PivotGrid` component.

The user can replace the following `PivotGridConfigurator` components with custom ones:

* [Editor](https://www.telerik.com/kendo-react-ui/components/pivotgrid/api/pivotgridconfiguratorprops#editor)—The `editor` contains all components responsible for editing the current configuration.
* [Form](https://www.telerik.com/kendo-react-ui/components/pivotgrid/api/pivotgridconfiguratorprops#form)—The `form` provides the necessary functionality to access and edit individual parts of the configuration, as well as intermediate state.
* [FormElement](https://www.telerik.com/kendo-react-ui/components/pivotgrid/api/pivotgridconfiguratorprops#formelement)—The `formElement` provides a default container for all internal editor `fields`.

Additionally, the user can replace more-specific elements which are deeply nested in the `PivotGridConfigurator` tree:

* For the `editor`:
  * [`fields`](https://www.telerik.com/kendo-react-ui/components/pivotgrid/api/pivotgridconfiguratoreditorprops#fieldseditor), [`column axes`](https://www.telerik.com/kendo-react-ui/components/pivotgrid/api/pivotgridconfiguratoreditorprops#columnAxesLabel), [`row axes`](https://www.telerik.com/kendo-react-ui/components/pivotgrid/api/pivotgridconfiguratoreditorprops#rowAxesLabel) and [`measure axes`](https://www.telerik.com/kendo-react-ui/components/pivotgrid/api/pivotgridconfiguratoreditorprops#measureAxesLabel) labels.
  * [`fieldsEditor`](https://www.telerik.com/kendo-react-ui/components/pivotgrid/api/pivotgridconfiguratoreditorprops#fieldseditor)— The [`FieldsEditor`](https://www.telerik.com/kendo-react-ui/components/pivotgrid/api/pivotgridfieldseditorprops) further allows customization of:
    * [`treeView`](https://www.telerik.com/kendo-react-ui/components/pivotgrid/api/pivotgridfieldseditorprops#treeview)
    * [`noData`](https://www.telerik.com/kendo-react-ui/components/pivotgrid/api/pivotgridfieldseditorprops#noData)
  * [`row`](https://www.telerik.com/kendo-react-ui/components/pivotgrid/api/pivotgridconfiguratoreditorprops#rowAxesEditor), [`column`](https://www.telerik.com/kendo-react-ui/components/pivotgrid/api/pivotgridconfiguratoreditorprops#columnAxesEditor) and [`measure`](https://www.telerik.com/kendo-react-ui/components/pivotgrid/api/pivotgridconfiguratoreditorprops#measureAxesEditor) axes editors. The [`AxesEditor`](https://www.telerik.com/kendo-react-ui/components/pivotgrid/api/pivotgridaxeseditorprops) further allows customization of:
    * [`chipList`](https://www.telerik.com/kendo-react-ui/components/pivotgrid/api/pivotgridaxeseditorprops#chiplist)
* The [`AxisEditor`](https://www.telerik.com/kendo-react-ui/components/pivotgrid/api/pivotgridaxiseditorprops) allows further customization of:
  * [`chip`](https://www.telerik.com/kendo-react-ui/components/pivotgrid/api/pivotgridaxiseditorprops#chip)
  * [`dropClue`](https://www.telerik.com/kendo-react-ui/components/pivotgrid/api/pivotgridaxiseditorprops#dropclue)
  * [`columnMenuTextColumn`](https://www.telerik.com/kendo-react-ui/components/pivotgrid/api/pivotgridaxiseditorprops#columnMenuTextColumn)
  * [`filterFieldsEditor`](https://www.telerik.com/kendo-react-ui/components/pivotgrid/api/pivotgridaxiseditorprops#filterfieldseditor)— The [`AxisFilterFieldsEditor`](https://www.telerik.com/kendo-react-ui/components/pivotgrid/api/pivotgridaxisfilterfieldseditorprops) further allows customization of:
    * [`resetButton`](https://www.telerik.com/kendo-react-ui/components/pivotgrid/api/pivotgridaxisfilterfieldseditorprops#resetbutton)
    * [`applyButton`](https://www.telerik.com/kendo-react-ui/components/pivotgrid/api/pivotgridaxisfilterfieldseditorprops#applybutton)
    * [`treeView`](https://www.telerik.com/kendo-react-ui/components/pivotgrid/api/pivotgridaxisfilterfieldseditorprops#treeview)
    * [`noData`](https://www.telerik.com/kendo-react-ui/components/pivotgrid/api/pivotgridaxisfilterfieldseditorprops#nodata)

## Importing the Default Components

All of the default components are contained in the `@progress/kendo-react-pivotgrid` package and are set as `defaultProps` of their parent.

```jsx
// ES2015 module syntax
import { PivotGridConfiguratorEditor, PivotGridFieldsEditor, PivotGridAxesEditor, PivotGridAxisEditor, PivotGridAxisFilterFieldsEditor } from '@progress/kendo-react-pivotgrid';
```

```jsx
// CommonJS format
const { PivotGridConfiguratorEditor, PivotGridFieldsEditor, PivotGridAxesEditor, PivotGridAxisEditor, PivotGridAxisFilterFieldsEditor } = require('@progress/kendo-react-pivotgrid');
```

## Providing a Custom Component

To customize a PivotGridConfigurator component, first create a new React Component which [compose](https://reactjs.org/docs/composition-vs-inheritance.html) the default one.

> The recommended approach is to always wrap the component in an `React.forwardRef` for functional components, and pass the `ref` to the default component to assure correct behavior of the internal components.

```jsx
const CustomLabel = React.forwardRef((props, ref) => {
    return (
      <Label
        ref={ref}
        {...props}
        style={{ color: '#3f51b5' }}
      >
        {props.children}{":"}
      </Label>
    )
})

const CustomEditor = React.forwardRef((props, ref) => {
    return (
        <PivotGridEditor
            ref={ref}
            {...props}
            fieldsLabel={CustomLabel}
            columnAxesLabel={CustomLabel}
            rowAxesLabel={CustomLabel}
            measureAxesLabel={CustomLabel}
        />
    )
})
```

To apply the customization, provide the corresponding `editor` property to the `PivotGridConfigurator`:

```jsx
<PivotGridConfigurator editor={CustomEditor} />
```

The following example demonstrates the PivotGridConfigurator `editor` customization in-action:

[Demo Source](https://demos.telerik.com/kendo-react-ui/pivotgrid/customization/configurator/editor/basic/func/source.txt)

## Suggested Links

* [PivotGrid Customization Overview](https://www.telerik.com/kendo-react-ui/components/pivotgrid/api/pivotgridconfiguratorprops)
* [API Reference of the KendoReact PivotGridConfigurator](https://www.telerik.com/kendo-react-ui/components/pivotgrid/api/pivotgridconfiguratorprops)
* [API Reference of the KendoReact PivotGridConfiguratorEditor](https://www.telerik.com/kendo-react-ui/components/pivotgrid/api/pivotgridconfiguratoreditorprops)
