-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Refactor DatePicker to be compatible with Form #7536
Comments
Triggered auto assignment to @kevinksullivan ( |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane ( |
Triggered auto assignment to @Luke9389 ( |
Proposal |
@sig5 how will you implement shouldSaveDraft? |
Hi @rushatgabhane, as far as I can observe, Lines 144 to 167 in 4c48227
So adding a propType in the component along with a defaultProp should suffice to trigger it save in Onyx, which can be fetched next time it is mounted.Please correct me if I am misunderstanding the problem.
|
@sig5 you are correct! Passing the |
I agree. |
Ok cool! Go ahead and start the PR @sig5. Thanks @rushatgabhane and @luacmartins |
FYI @sig5 I hired you for the job in upwork. |
@luacmartins Just a clarification, What is the expected behaviour of Datepicker on Android/iOS if |
@sig5 It should do nothing because input is not editable. Now, the question is should it open the datepicker? I don't think so, because showing the date picker after clicking submit will be confusing. So let's do nothing :) |
@sig5 are you referring to the |
Yes, I was referring exactly that. Thanks for the clarification 😄! |
This issue has not been updated in over 15 days. @kevinksullivan, @rushatgabhane, @Luke9389 eroding to Monthly issue. P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do! |
Still weekly! |
This issue has not been updated in over 15 days. @kevinksullivan, @rushatgabhane, @Luke9389 eroding to Monthly issue. P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do! |
Waiting for @sig5 to address @ luacmartins' comments in the PR |
@sig5 won't be able to complete the PR as per this comment. I'll move this issue to internal and work on it to push this project forward. @rushatgabhane please let @kevinksullivan know if any C+ payment is due. Thanks! |
@kevinksullivan no C+ payments due here. |
@kevinksullivan this was made |
All set, post is not longer accepting proposals and I cancelled out the contract. |
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:
isFormInput
prop.isFormInput
istrue
, require ainputID
prop. Use getInputIDPropTypes to enforce this propType rule.shouldSaveDraft
prop. Defaults tofalse
.value
prop optional.onBlur
method, callprops.onBlur()
.onChange
method (or equivalent e.g. onTextChange, etc), callprops.onChange()
.hasError
prop.errorText
prop. Defaults to an empty string.errorText
is truthy.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 callref.focus()
.npm run storybook
and testing the component in the example form.There's an example of a refactor to
TextInput
in this PR.Job Post https://www.upwork.com/jobs/~015dde9db58cb60ea3
The text was updated successfully, but these errors were encountered: