@@ -83,18 +83,16 @@ export const defaultProps = {
83
83
virtualization : false
84
84
} ;
85
85
86
- const cellCoordsIDsProp = PropTypes . exact ( {
87
- row : PropTypes . number ,
88
- column : PropTypes . number ,
89
- row_id : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . number ] ) ,
90
- column_id : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . number ] )
91
- } ) ;
92
-
93
86
export const propTypes = {
94
87
/**
95
88
* The row and column indices and IDs of the currently active cell.
96
89
*/
97
- active_cell : cellCoordsIDsProp ,
90
+ active_cell : PropTypes . exact ( {
91
+ row : PropTypes . number ,
92
+ column : PropTypes . number ,
93
+ row_id : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . number ] ) ,
94
+ column_id : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . number ] )
95
+ } ) ,
98
96
99
97
/**
100
98
* Columns describes various aspects about each individual column.
@@ -429,7 +427,12 @@ export const propTypes = {
429
427
* in one of the corners of the region.
430
428
* `start_cell` represents the coordinates of the other corner.
431
429
*/
432
- end_cell : cellCoordsIDsProp ,
430
+ end_cell : PropTypes . exact ( {
431
+ row : PropTypes . number ,
432
+ column : PropTypes . number ,
433
+ row_id : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . number ] ) ,
434
+ column_id : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . number ] )
435
+ } ) ,
433
436
434
437
/**
435
438
* The ID of the table.
@@ -505,7 +508,12 @@ export const propTypes = {
505
508
* clicking on a different cell or holding down shift and navigating
506
509
* with the arrow keys.
507
510
*/
508
- selected_cells : PropTypes . arrayOf ( cellCoordsIDsProp ) ,
511
+ selected_cells : PropTypes . arrayOf ( PropTypes . exact ( {
512
+ row : PropTypes . number ,
513
+ column : PropTypes . number ,
514
+ row_id : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . number ] ) ,
515
+ column_id : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . number ] )
516
+ } ) ) ,
509
517
510
518
/**
511
519
* `selected_rows` contains the indices of rows that
@@ -532,7 +540,12 @@ export const propTypes = {
532
540
* in one of the corners of the region.
533
541
* `end_cell` represents the coordinates of the other corner.
534
542
*/
535
- start_cell : cellCoordsIDsProp ,
543
+ start_cell : PropTypes . exact ( {
544
+ row : PropTypes . number ,
545
+ column : PropTypes . number ,
546
+ row_id : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . number ] ) ,
547
+ column_id : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . number ] )
548
+ } ) ,
536
549
537
550
/**
538
551
* If True, then the table will be styled like a list view
0 commit comments