Skip to content

Commit b4f789f

Browse files
authored
Merge pull request #263 from UgnisSoftware/UGN-428
Remove defaultProps usage
2 parents 1101626 + 87b7b7d commit b4f789f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.eslintrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
"@typescript-eslint/no-explicit-any": 0,
1818
"@typescript-eslint/no-non-null-assertion": 0,
1919
"@typescript-eslint/no-unused-vars": 0,
20-
"@typescript-eslint/no-empty-function": 0
20+
"@typescript-eslint/no-empty-function": 0,
21+
"react/prop-types": 0
2122
},
2223
"env": {
2324
"browser": true,

src/ReactSpreadsheetImport.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ export const defaultRSIProps: Partial<RsiProps<any>> = {
2323
parseRaw: true,
2424
} as const
2525

26-
export const ReactSpreadsheetImport = <T extends string>(props: RsiProps<T>) => {
26+
export const ReactSpreadsheetImport = <T extends string>(propsWithoutDefaults: RsiProps<T>) => {
27+
const props = merge(defaultRSIProps, propsWithoutDefaults)
2728
const mergedTranslations =
2829
props.translations !== translations ? merge(translations, props.translations) : translations
2930
const mergedThemes = props.rtl
@@ -38,5 +39,3 @@ export const ReactSpreadsheetImport = <T extends string>(props: RsiProps<T>) =>
3839
</Providers>
3940
)
4041
}
41-
42-
ReactSpreadsheetImport.defaultProps = defaultRSIProps

0 commit comments

Comments
 (0)