-
Notifications
You must be signed in to change notification settings - Fork 934
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
Time Picker: Preserve initial input value in Time Picker component #4488
Time Picker: Preserve initial input value in Time Picker component #4488
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good! I'm leaning towards using data-default-value for consistency. What do you think @thisisdano?
|
I'm sorry, this one got past me. I agree with James, let's use |
|
Updated to use
Is there anything you need from me to help push this along? In the meantime, I'll remove the "Fixes" auto-close text from the original comment. |
|
Hey @aduth, thanks for the reminder! Nothing wrong with the functionality, it works well. Just two outstanding issues. The guidance on Time picker under the Based on that we have these outstanding tasks:
|
|
@aduth Sorry for the backtracking, but after reviewing this issue again, we'd like to revert to your initial implementation, using the @mejiaj Let's also work to update components like Date Picker to work more like this. |
This reverts commit 731748f.
|
Sounds good, pushed the revert in fc6df77. I still need to find some time to circle back on the documentation to wrap this up. |
Partially addresses #4331
Description
This pull request resolves an issue where if an enhanced Time Picker input has a value, the value is discarded during initialization, thereby preventing a developer from including an initial value for a time picker element.
Additional information
Note that the Fractal component variant was based on a similar Date Picker default value variant, but in that case the default value is expected to be assigned using a
data-default-valueattribute.Here, I chose instead to let the nativeEdit: Per feedback, changed tovalueattribute be used since it is likely to be more intuitively understood as a way to control the input value, though I am open to revising this todata-default-valuefor consistency's sake.data-default-valuein 731748f.Before you hit Submit, make sure you’ve done whichever of these applies to you:
npm testand make sure the tests for the files you have changed have passed.