React PivotGridFieldChooser Props
accessKey
The value of this property will be passed to the accesskey
attribute of the HTML element that underlies the UI component.
activeStateEnabled
The UI component switches to the active state when users press down the primary mouse button. When this property is set to true, the CSS rules for the active state apply. You can change these rules to customize the component.
Use this property when you display the component on a platform whose guidelines include the active state change for UI components.
applyChangesMode
The following modes are available:
"instantly"
Applies changes immediately."onDemand"
Applies or cancels changes only when this is requested from the API - by calling the applyChanges() or cancelChanges() method or by changing the state object.
dataSource
The data source of a PivotGrid UI component.
It is important for the data source of the PivotGridFieldChooser to be the same as the data source of its PivotGrid UI component. This will allow the field chooser to manage data in the pivot grid. Use the PivotGrid's getDataSource method to acquire its data source.
elementAttr
Specifies the global attributes to be attached to the UI component's container element.
- import React from 'react';
- import PivotGridFieldChooser from 'devextreme-react/pivot-grid-field-chooser';
- class App extends React.Component {
- pivotGridFieldChooserAttributes = {
- id: 'elementId',
- class: 'class-name'
- }
- render() {
- return (
- <PivotGridFieldChooser ...
- elementAttr={this.pivotGridFieldChooserAttributes}>
- </PivotGridFieldChooser>
- );
- }
- }
- export default App;
encodeHtml
Specifies whether HTML tags are displayed as plain text or applied to the values of the header filter.
When true, the component displays HTML tags as plain text; when false, the component applies them to the header filter values. If you disable this property, malicious code can be executed. Refer to the following help topic for more information: Potentially Vulnerable API - encodeHtml.
headerFilter
A header filter allows a user to filter individual field's values by including or excluding them from the applied filter. Cicking a header filter icon invokes a popup menu displaying all the unique field values.
Assign true to the allowFiltering property to make the icons visible.
The user's filtering preferences are saved in the filterValues property. The header filter's Select All checkbox changes the filterType property.
height
This property accepts a value of one of the following types:
Number
The height in pixels.String
A CSS-accepted measurement of height. For example,"55px"
,"20vh"
,"80%"
,"inherit"
.Function (deprecated since v21.2)
Refer to the W0017 warning description for information on how you can migrate to viewport units.
layout
The image below shows different layout types.
The following abbreviations are used on the image.
- A — All Fields
- F — Filter Fields
- R — Row Fields
- C — Column Fields
- D — Data Fields
onContentReady
A function that is executed when the UI component is rendered and each time the component is repainted.
Name | Type | Description |
---|---|---|
element |
The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery. |
|
component |
The UI component's instance. |
onContextMenuPreparing
Name | Type | Description |
---|---|---|
area |
The clicked area's type. |
|
component |
The UI component's instance. |
|
element |
The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery. |
|
event | Event (jQuery or EventObject) |
The event that caused the function to execute. It is an EventObject or a jQuery.Event when you use jQuery. |
field |
The configuration of the field on which the context menu is invoked. |
|
items |
Items to be displayed in the context menu. Their structure is described in the items property description. |
onDisposing
A function that is executed before the UI component is disposed of.
Name | Type | Description |
---|---|---|
element |
The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery. |
|
component |
The UI component's instance. |
onInitialized
Name | Type | Description |
---|---|---|
element |
The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery. |
|
component |
The UI component's instance. |
- import PivotGridFieldChooser from 'devextreme-react/pivot-grid-field-chooser';
- class App extends React.Component {
- constructor(props) {
- super(props);
- this.saveInstance = this.saveInstance.bind(this);
- }
- saveInstance(e) {
- this.pivotGridFieldChooserInstance = e.component;
- }
- render() {
- return (
- <div>
- <PivotGridFieldChooser onInitialized={this.saveInstance} />
- </div>
- );
- }
- }
See Also
- Get a UI component Instance in React
onOptionChanged
Name | Type | Description |
---|---|---|
value | any |
The modified property's new value. |
previousValue | any |
The UI component's previous value. |
name |
The modified property if it belongs to the first level. Otherwise, the first-level property it is nested into. |
|
fullName |
The path to the modified property that includes all parent properties. |
|
element |
The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery. |
|
component |
The UI component's instance. |
The following example shows how to subscribe to component property changes:
- import React from 'react';
- import 'devextreme/dist/css/dx.light.css';
- import PivotGridFieldChooser from 'devextreme-react/pivot-grid-field-chooser';
- const handlePropertyChange = (e) => {
- if(e.name === "changedProperty") {
- // handle the property change here
- }
- }
- export default function App() {
- return (
- <PivotGridFieldChooser ...
- onOptionChanged={handlePropertyChange}
- />
- );
- }
rtlEnabled
When this property is set to true, the UI component text flows from right to left, and the layout of elements is reversed. To switch the entire application/site to the right-to-left representation, assign true to the rtlEnabled field of the object passed to the DevExpress.config(config) method.
- DevExpress.config({
- rtlEnabled: true
- });
searchTimeout
Specifies a delay in milliseconds between when a user finishes typing in the field chooser's search panel, and when the search is executed.
state
The state includes field configurations, expanded headers, and other settings. The following code shows how to use the state to cancel or apply the settings to the PivotGrid UI component:
See Also
tabIndex
The value of this property will be passed to the tabindex
attribute of the HTML element that underlies the UI component.
width
This property accepts a value of one of the following types:
Number
The width in pixels.String
A CSS-accepted measurement of width. For example,"55px"
,"20vw"
,"80%"
,"auto"
,"inherit"
.Function (deprecated since v21.2)
Refer to the W0017 warning description for information on how you can migrate to viewport units.
If you have technical questions, please create a support ticket in the DevExpress Support Center.