Open m-natarajan opened 2 weeks ago
Triggered auto assignment to @puneetlath (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.
This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989
Edited by proposal-police: This proposal was edited at 2024-09-12 23:05:24 UTC.
Console Warning: A props object containing a “key” prop is being spread into JSX
This happens in the InputWrapper
where we apply spread operator for registerInput
which contains key
prop:
Separate the key
and other props from registerInput
:
const {key, ...restProps} = registerInput();
return <InputComponent key={key} {...restProps} />;
Additionally, we might need to double check every places where we use spread operator for component props to ensure they do not spread key
. We can leverage the eslint-disable-next-line react/jsx-props-no-spreading
lint for this case.
Job added to Upwork: https://www.upwork.com/jobs/~021836067438259125444
Triggered auto assignment to Contributor-plus team member for initial proposal review - @jayeshmangwani (External
)
@gijoe0295 Is this issue going to be resolved in this PR https://github.com/Expensify/App/pull/49222?
@jayeshmangwani No, this should be handled separately.
I agree with @gijoe0295 's Proposal. We should check every spread operator used in the other components too and ensure that the key is passed separately from spread
🎀 👀 🎀 C+ reviewed
Current assignee @puneetlath is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.
📣 @gijoe0295 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!
Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑💻 Keep in mind: Code of Conduct | Contributing 📖
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 9.0.30-9 Reproducible in staging?: Needs reproduction Reproducible in production?: Needs reproduction If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: @c3024 Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1726072795900059?thread_ts=1726072125.690969&cid=C049HHMV9SM
Action Performed:
Expected Result:
No console warning on the workspace merchant page.
Actual Result:
Console Warning ERROR Warning: A props object containing a “key” prop is being spread into JSX: let props = {key: someKey, ref: ..., valueType: ..., name: ..., defaultValue: ..., maxLength: ..., label: ..., accessibilityLabel: ..., role: ..., shouldSetTouchedOnBlurOnly: ..., blurOnSubmit: ..., onSubmitEditing: ..., returnKeyType: ..., inputID: ..., errorText: ..., value: ..., onTouched: ..., onPress: ..., onPressOut: ..., onBlur: ..., onInputChange: ...}; <ForwardRef(TextInput) {...props} />
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @jayeshmangwani