File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -96,45 +96,37 @@ const rows = [
9696 }
9797];
9898
99- const MyAwesomeTable = () => {
100-
101- const columns = [
102- {
103- id: 1 ,
104- field: ' username' ,
105- label: ' Username' ,
106- cellRenderer: Username,
107- },
108- {
109- id: 2 ,
110- field: ' gender' ,
111- label: ' Gender' ,
112- },
113- {
114- id: 3 ,
115- field: ' last_visited' ,
116- label: ' Last Visited' ,
117- sort : ({a, b, isAscending}) => {
118- let aa = a .split (' /' ).reverse ().join (),
119- bb = b .split (' /' ).reverse ().join ();
120- return aa < bb ? isAscending ? - 1 : 1 : (aa > bb ? isAscending ? 1 : - 1 : 0 );
121- }
122- },
123- {
124- id: 4 ,
125- field: ' test' ,
126- label: ' Score' ,
127- getValue : ({value, column}) => value .x + value .y
99+ const columns = [
100+ {
101+ id: 1 ,
102+ field: ' username' ,
103+ label: ' Username' ,
104+ cellRenderer: Username,
105+ },
106+ {
107+ id: 2 ,
108+ field: ' gender' ,
109+ label: ' Gender' ,
110+ },
111+ {
112+ id: 3 ,
113+ field: ' last_visited' ,
114+ label: ' Last Visited' ,
115+ sort : ({a, b, isAscending}) => {
116+ let aa = a .split (' /' ).reverse ().join (),
117+ bb = b .split (' /' ).reverse ().join ();
118+ return aa < bb ? isAscending ? - 1 : 1 : (aa > bb ? isAscending ? 1 : - 1 : 0 );
128119 }
129- ];
120+ },
121+ {
122+ id: 4 ,
123+ field: ' test' ,
124+ label: ' Score' ,
125+ getValue : ({value, column}) => value .x + value .y
126+ }
127+ ];
130128
131- return (
132- < GridTable
133- columns= {columns}
134- rows= {rows}
135- / >
136- )
137- };
129+ const MyAwesomeTable = () => < GridTable columns= {columns} rows= {rows} / > ;
138130
139131export default MyAwesomeTable ;
140132```
You can’t perform that action at this time.
0 commit comments