Skip to content

Conversation

@bobular
Copy link
Member

@bobular bobular commented Nov 14, 2025

Likely not needed if the TypeScript conversions work out.

Note that Ann has already tackled this a year ago in #1226
Not sure if there are merge conflicts with that 1yr old PR. We should compare the approaches.

The defaultProps property for functional components is deprecated in React. This commit replaces all instances of defaultProps with ES6 default parameter syntax in functional components.

Changes:

  • RecordActionLink.jsx: Use destructured params with defaults
  • Sequence.tsx: Use destructured params with defaults
  • FieldFilter.jsx: Use destructured params with defaults
  • ServerSideAttributeFilter.jsx: Use destructured params with defaults
  • CheckboxTree.tsx: Use destructured params with defaults
  • SelectTree.tsx: Use destructured params with defaults

Class components were left unchanged as defaultProps is still valid for them.

The defaultProps property for functional components is deprecated in React.
This commit replaces all instances of defaultProps with ES6 default parameter
syntax in functional components.

Changes:
- RecordActionLink.jsx: Use destructured params with defaults
- Sequence.tsx: Use destructured params with defaults
- FieldFilter.jsx: Use destructured params with defaults
- ServerSideAttributeFilter.jsx: Use destructured params with defaults
- CheckboxTree.tsx: Use destructured params with defaults
- SelectTree.tsx: Use destructured params with defaults

Class components were left unchanged as defaultProps is still valid for them.
@bobular bobular changed the title Replace deprecated defaultProps with modern default parameters Replace deprecated defaultProps with modern default parameters [Claude Code Web] Nov 15, 2025
SelectTreeProps extends CheckboxTreeProps, so we should only destructure
SelectTree-specific properties and leave CheckboxTree props to be accessed
via props for proper type checking.
Properties that have default values in the function signature should be
marked as optional in the TypeScript interface to maintain type consistency.
Update helper function parameter types to match the guaranteed non-nullable
types after default values are applied. This resolves type errors while
maintaining type safety.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants