This repository was archived by the owner on Jan 3, 2024. It is now read-only.
OcTextInput: add defaultValue prop and make clear button null the value#1636
Merged
Conversation
|
Kudos, SonarCloud Quality Gate passed! |
…rt back to default
Placeholder usage is discouraged but we can easily change the implementation (while keeping the api stable) when we have a better concept of handling default values in text input elements.
6e43b0e to
f36e43e
Compare
pascalwengerter
left a comment
Contributor
There was a problem hiding this comment.
LGTM and thanks for taking care, would like to get a final approval from @kulmann before merging
|
Kudos, SonarCloud Quality Gate passed! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.








Description
nullinstead of empty stringdefaultValueprop that is for now passed asplaceholderto the input field.Needs UX concept by @kulmann and @tbsbdr
Related Issue
defaultValue) and makes it more consistent with other components that also emitnullon clear (which is not part of that table)Motivation and Context
Same as #1634 and #1635
Instead of using native
placeholderprop on theinputelement, I would propose to introduce thedefaultValueproperty which for now usesplaceholderbut keeps that as implementation detail. That way I can already use the functionality in ownBrander 2.0 and will automatically benefit from a better implementation at some point in the future.How Has This Been Tested?
Screenshots (if appropriate):
Only visual change: it's now possible to have an empty input field with clear button.
That is useful when a user overrides the default value with an empty string.
Types of changes
we don't emit empty strings anymore on clear, but afaict
clearButtonEnabledis used nowhere, so this shouldn't break anything in ownCloudChecklist:
Open tasks: