@@ -83,18 +83,16 @@ export const defaultProps = {
8383 virtualization : false
8484} ;
8585
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-
9386export const propTypes = {
9487 /**
9588 * The row and column indices and IDs of the currently active cell.
9689 */
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+ } ) ,
9896
9997 /**
10098 * Columns describes various aspects about each individual column.
@@ -429,7 +427,12 @@ export const propTypes = {
429427 * in one of the corners of the region.
430428 * `start_cell` represents the coordinates of the other corner.
431429 */
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+ } ) ,
433436
434437 /**
435438 * The ID of the table.
@@ -505,7 +508,12 @@ export const propTypes = {
505508 * clicking on a different cell or holding down shift and navigating
506509 * with the arrow keys.
507510 */
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+ } ) ) ,
509517
510518 /**
511519 * `selected_rows` contains the indices of rows that
@@ -532,7 +540,12 @@ export const propTypes = {
532540 * in one of the corners of the region.
533541 * `end_cell` represents the coordinates of the other corner.
534542 */
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+ } ) ,
536549
537550 /**
538551 * If True, then the table will be styled like a list view
0 commit comments