Skip to content

Commit

Permalink
Merge pull request #263 from UgnisSoftware/UGN-428
Browse files Browse the repository at this point in the history
Remove defaultProps usage
  • Loading branch information
masiulis authored Jul 30, 2024
2 parents 1101626 + 87b7b7d commit b4f789f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-non-null-assertion": 0,
"@typescript-eslint/no-unused-vars": 0,
"@typescript-eslint/no-empty-function": 0
"@typescript-eslint/no-empty-function": 0,
"react/prop-types": 0
},
"env": {
"browser": true,
Expand Down
5 changes: 2 additions & 3 deletions src/ReactSpreadsheetImport.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ export const defaultRSIProps: Partial<RsiProps<any>> = {
parseRaw: true,
} as const

export const ReactSpreadsheetImport = <T extends string>(props: RsiProps<T>) => {
export const ReactSpreadsheetImport = <T extends string>(propsWithoutDefaults: RsiProps<T>) => {
const props = merge(defaultRSIProps, propsWithoutDefaults)
const mergedTranslations =
props.translations !== translations ? merge(translations, props.translations) : translations
const mergedThemes = props.rtl
Expand All @@ -38,5 +39,3 @@ export const ReactSpreadsheetImport = <T extends string>(props: RsiProps<T>) =>
</Providers>
)
}

ReactSpreadsheetImport.defaultProps = defaultRSIProps

0 comments on commit b4f789f

Please sign in to comment.