File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,14 +6,14 @@ export interface ExcelSheetProps {
66 name : string ;
77 data ?: any [ ] ;
88 dataSet ?: ExcelSheetData [ ] ;
9- value : ExcelValue [ ] | ( ( ) => void ) ;
10- children : React . ReactElement < typeof ExcelColumn > [ ] ;
9+ value ? : ExcelValue [ ] | ( ( ) => void ) ;
10+ children ? : React . ReactElement < typeof ExcelColumn > [ ] ;
1111}
1212export default class ExcelSheet extends Component < ExcelSheetProps > {
1313 constructor ( props : ExcelSheetProps ) {
1414 super ( props ) ;
1515
16- if ( ! props . children . every ( ( child ) => child . type === ExcelColumn ) ) {
16+ if ( ! props . children ? .every ( ( child ) => child . type === ExcelColumn ) ) {
1717 throw new Error ( "<ExcelSheet> can only have <ExcelColumn> as children" ) ;
1818 }
1919 }
Original file line number Diff line number Diff line change @@ -12,8 +12,8 @@ declare module 'react-xlsx-wrapper' {
1212 name : string ;
1313 data ?: any [ ] ;
1414 dataSet ?: ExcelSheetData [ ] ;
15- value : ExcelValue [ ] | ( ( ) => void ) ;
16- children : React . ReactElement | Array < React . ReactElement > ;
15+ value ? : ExcelValue [ ] | ( ( ) => void ) ;
16+ children ? : React . ReactElement | Array < React . ReactElement > ;
1717 }
1818
1919 export interface ExcelSheetData {
You can’t perform that action at this time.
0 commit comments