-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[$1000] Dev: Web - Console error on report page #22023
Comments
Triggered auto assignment to @anmurali ( |
Bug0 Triage Checklist (Main S/O)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Problem1: The problem we are trying to solve is that the TextLink component is giving a warning that function components cannot be given refs. This warning indicates that there is an issue with how the component is being used and accessed. Problem2: accountID type is number but a string is given. What is the root cause of that problem?problem1: The root cause of this problem is that the TextLink component is being used in a way that tries to assign a ref to a function component, which is not allowed in React. This is likely happening because the component is being passed a ref prop or used in a context where a ref is expected. App/src/components/TextLink.js Line 33 in c0ece67
problem2:
keyForList type should be string. What changes do you think we should make in order to solve the problem?problem1: To fix this issue, we need to modify the TextLink component by using the React.forwardRef() function. This function allows us to create a new component that can receive a ref and pass it down to a child component. By using React.forwardRef(), we can ensure that the ref is correctly handled and accessed without triggering the warning. Here are the steps to implement the solution:
Inside the component, forward the ref to the underlying Text component by assigning it to the ref prop:
problem2: Convert
What alternative solutions did you explore? (Optional)N/A |
I don't get all those exceptions on that screenshot. I do get one consistently
|
Triggered auto assignment to @bondydaa ( |
Job added to Upwork: https://www.upwork.com/jobs/~019f8b708de9de6ef3 |
Current assignee @anmurali is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mollfpr ( |
I am not totally sure this is an issue in the UI layer but if it isn't then @mollfpr, will you let me know? And we can take it internal. |
@anmurali Sure! I will check this in an hour. |
if console errors were added then the original PRs should be found and commented on and fixed by those authors. we shouldn't spin up new issues for these. |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
Expected Result:
Errors shouldn't be visible.
Actual Result:
Console error on report page
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: Dev
Reproducible in staging?: n/a
Reproducible in production?: n/a
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
Notes/Photos/Videos: Any additional supporting documentation
Expensify/Expensify Issue URL:
Issue reported by: @aliammar1995
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1688205314450479
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: