-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Labels
Awaiting PaymentAuto-added when associated PR is deployed to productionAuto-added when associated PR is deployed to productionEngineeringExternalAdded to denote the issue can be worked on by a contributorAdded to denote the issue can be worked on by a contributorNewFeatureSomething to build that is a new item.Something to build that is a new item.ReviewingHas a PR in reviewHas a PR in reviewWeeklyKSv2KSv2
Description
Coming from the New Expensify Forms design doc, we should refactor CompanyStep to use the new form component, follow the guidelines below:
Here's an example of a Form refactor: #9056
Guidelines
- Replace the form component with Form.js.
- Create a unique Onyx key in ONYXKEYS.FORM and pass it as the formID prop to Form.
- Pass a validate callback prop.
- Pass an onSubmit callback prop that calls the API via an action.
- Update all inputs wrapped by Form, following the guidelines in Refactor inputs.
- Remove any unused code.
Testing
Verify that:
- UI looks as it did before the refactor
- Values can be added and edited
- Errors are highlighted correctly (input border)
- Error messages show up correctly
- Draft values are saved properly
- Form alerts are displayed correctly
- Clicking the
fix the errorslink focuses the first input with error - No duplicate submission of the form occurs (when it's already submitting)
Reactions are currently unavailable
Metadata
Metadata
Labels
Awaiting PaymentAuto-added when associated PR is deployed to productionAuto-added when associated PR is deployed to productionEngineeringExternalAdded to denote the issue can be worked on by a contributorAdded to denote the issue can be worked on by a contributorNewFeatureSomething to build that is a new item.Something to build that is a new item.ReviewingHas a PR in reviewHas a PR in reviewWeeklyKSv2KSv2