Skip to content

Commit 33153a1

Browse files
committed
feat: modify JS type declaration for DataTable to get Python typing right
1 parent 2deacec commit 33153a1

File tree

1 file changed

+14
-35
lines changed

1 file changed

+14
-35
lines changed

components/dash-table/src/dash-table/dash/DataTable.js

+14-35
Original file line numberDiff line numberDiff line change
@@ -472,25 +472,14 @@ export const propTypes = {
472472
* View the documentation examples to learn more.
473473
*
474474
*/
475-
fixed_columns: PropTypes.oneOfType([
476-
PropTypes.exact({
477-
/**
478-
* Example `{'headers':False, 'data':0}` No columns are fixed (the default)
479-
*/
480-
481-
data: PropTypes.oneOf([0]),
482-
headers: PropTypes.oneOf([false])
483-
}),
484-
485-
PropTypes.exact({
486-
/**
487-
* Example `{'headers':True, 'data':1}` one column is fixed.
488-
*/
475+
fixed_columns: PropTypes.exact({
476+
/**
477+
* Example `{'headers':False, 'data':0}` No columns are fixed (the default)
478+
*/
489479

490-
data: PropTypes.number,
491-
headers: PropTypes.oneOf([true]).isRequired
492-
})
493-
]),
480+
data: PropTypes.number,
481+
headers: PropTypes.bool
482+
}),
494483

495484
/**
496485
* `fixed_rows` will "fix" the set of rows so that
@@ -505,24 +494,14 @@ export const propTypes = {
505494
* way that your columns are rendered or sized.
506495
* View the documentation examples to learn more.
507496
*/
508-
fixed_rows: PropTypes.oneOfType([
509-
PropTypes.exact({
510-
/**
511-
* Example `{'headers':False, 'data':0}` No rows are fixed (the default)
512-
*/
513-
514-
data: PropTypes.oneOf([0]),
515-
headers: PropTypes.oneOf([false])
516-
}),
517-
PropTypes.exact({
518-
/**
519-
* Example `{'headers':True, 'data':1}` one row is fixed.
520-
*/
497+
fixed_rows: PropTypes.exact({
498+
/**
499+
* Example `{'headers':False, 'data':0}` No rows are fixed (the default)
500+
*/
521501

522-
data: PropTypes.number,
523-
headers: PropTypes.oneOf([true]).isRequired
524-
})
525-
]),
502+
data: PropTypes.number,
503+
headers: PropTypes.bool
504+
}),
526505

527506
/**
528507
* If `single`, then the user can select a single column or group

0 commit comments

Comments
 (0)