@@ -2,17 +2,10 @@ import React from 'react';
2
2
import ReactDOM from 'react-dom/client' ;
3
3
import './index.css' ;
4
4
import { SALES_DATA_NEW as pivotData } from './salesDataNew' ;
5
- import { IgrPivotConfiguration , IgrPivotDataSelector , IgrPivotDataSelectorModule ,
6
- IgrPivotGrid , IgrPivotGridModule } from 'igniteui-react-grids' ;
5
+ import { IgrPivotConfiguration , IgrPivotDataSelector , IgrPivotDateDimension , IgrPivotGrid } from 'igniteui-react-grids' ;
7
6
8
7
import 'igniteui-react-grids/grids/themes/light/bootstrap.css' ;
9
8
10
- const mods : any [ ] = [
11
- IgrPivotGridModule ,
12
- IgrPivotDataSelectorModule
13
- ] ;
14
- mods . forEach ( ( m ) => m . register ( ) ) ;
15
-
16
9
export default function App ( ) {
17
10
let grid : IgrPivotGrid ;
18
11
const gridRef = ( r : IgrPivotGrid ) => {
@@ -23,10 +16,10 @@ export default function App() {
23
16
}
24
17
const pivotConfiguration : IgrPivotConfiguration = {
25
18
rows : [
26
- {
19
+ new IgrPivotDateDimension ( {
27
20
enabled : true ,
28
21
memberName : "Date" ,
29
- } ,
22
+ } )
30
23
] ,
31
24
columns : [
32
25
{
@@ -66,7 +59,7 @@ export default function App() {
66
59
< div className = "container fill" >
67
60
< div className = "pivot-container" >
68
61
< div >
69
- < IgrPivotGrid data = { pivotData } ref = { gridRef } pivotConfiguration = { pivotConfiguration } >
62
+ < IgrPivotGrid data = { pivotData } ref = { gridRef } pivotConfiguration = { pivotConfiguration } defaultExpandState = { true } superCompactMode = { true } >
70
63
</ IgrPivotGrid >
71
64
</ div >
72
65
< IgrPivotDataSelector ref = { selector } > </ IgrPivotDataSelector >
0 commit comments