Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(all): replace defaultProps with inline function defaults #1440

Merged
merged 1 commit into from
Jan 24, 2024

Conversation

Hyperkid123
Copy link
Member

Fixes #1439

@rvsia this will need proper validation

Copy link

vercel bot commented Jan 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-forms ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 24, 2024 7:56am

Copy link

codecov bot commented Jan 23, 2024

Codecov Report

Attention: 31 lines in your changes are missing coverage. Please review.

Comparison is base (8f59331) 94.88% compared to head (c0eb916) 94.48%.
Report is 1 commits behind head on master.

Files Patch % Lines
...ui-component-mapper/src/field-array/field-array.js 84.00% 4 Missing ⚠️
...nt-mapper/src/dual-list-select/dual-list-select.js 92.30% 3 Missing ⚠️
...ges/pf4-component-mapper/src/select/select/menu.js 62.50% 3 Missing ⚠️
...ir-component-mapper/src/field-array/field-array.js 84.21% 3 Missing ⚠️
...ackages/suir-component-mapper/src/select/select.js 40.00% 3 Missing ⚠️
...nt-component-mapper/src/field-array/field-array.js 89.47% 2 Missing ⚠️
...on-component-mapper/src/field-array/field-array.js 80.00% 2 Missing ⚠️
...s/carbon-component-mapper/src/sub-form/sub-form.js 50.00% 2 Missing ⚠️
...nt-mapper/src/dual-list-select/dual-list-select.js 88.23% 2 Missing ⚠️
...nt-mapper/src/dual-list-select/dual-list-select.js 94.11% 2 Missing ⚠️
... and 5 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1440      +/-   ##
==========================================
- Coverage   94.88%   94.48%   -0.40%     
==========================================
  Files         210      210              
  Lines        3711     3971     +260     
  Branches     1295     1628     +333     
==========================================
+ Hits         3521     3752     +231     
- Misses        190      219      +29     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -28,7 +28,7 @@ const useStyles = createUseStyles({
},
});

const List = ({ value, optionClick, noOptionsTitle, filterValue, filterValueText, selectedValues, MenuProps, MenuItemProps }) => {
const List = ({ value = {}, optionClick, noOptionsTitle, filterValue, filterValueText, selectedValues, MenuProps = {}, MenuItemProps = {} }) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

value should be array

cancelLabel: 'Cancel',
resetLabel: 'Reset',
canReset: false,
canSubmit: false,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this not used?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's been moved to the FormControls argument defaults.

@Hyperkid123 Hyperkid123 merged commit 83f4d17 into master Jan 24, 2024
4 of 6 checks passed
@Hyperkid123 Hyperkid123 deleted the default-props branch January 24, 2024 08:25
@rvsia rvsia added the released label Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor of defaultProps usages to use default parameters instead
2 participants