You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Refactor DatePicker to be compatible with Form #7536
With the implementation of our new Form component we need to refactor DatePicker to be Form compatible. Here are the changes that need to be made:
An optional isFormInput prop.
If isFormInput is true, require a inputID prop. Use getInputIDPropTypes to enforce this propType rule.
Add an optional shouldSaveDraft prop. Defaults to false.
Make the value prop optional.
In the input’s onBlur method, call props.onBlur().
In the input’s onChange method (or equivalent e.g. onTextChange, etc), call props.onChange().
Remove the hasError prop.
Add an optional errorText prop. Defaults to an empty string.
Update the error message to display if errorText is truthy.
Update the inline error display style so it is left aligned with the label and input value. See example image for TextInput:
Make sure that props.ref is attached to the appropriate DOM node. This could involve forwarding the ref to a child component. This is important so we can call ref.focus().
Add the input to the test Form stories and make sure that it works. You can check this by running npm run storybook and testing the component in the example form.
Remove any unused code.
There's an example of a refactor to TextInput in this PR.
Activity
MelvinBot commentedon Feb 2, 2022
Triggered auto assignment to @kevinksullivan (
External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.kevinksullivan commentedon Feb 3, 2022
https://www.upwork.com/jobs/~015dde9db58cb60ea3
MelvinBot commentedon Feb 3, 2022
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane (
Exported)MelvinBot commentedon Feb 3, 2022
Triggered auto assignment to @Luke9389 (
Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.28 remaining items
rushatgabhane commentedon Apr 22, 2022
@kevinksullivan no C+ payments due here.
luacmartins commentedon Apr 26, 2022
@kevinksullivan this was made
Internal, please delete the Upwork job when you get a chance. Removing theExportedlabel.kevinksullivan commentedon Apr 26, 2022
All set, post is not longer accepting proposals and I cancelled out the contract.
[-][$250] Refactor DatePicker to be compatible with Form[/-][+]Refactor DatePicker to be compatible with Form[/+]