This repository has been archived by the owner on Jan 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
OcTextInput: add defaultValue prop and make clear button null the value #1636
Merged
Conversation
This file contains 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
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.
pascalwengerter
force-pushed
the
work/textinput_defaultValue
branch
from
November 3, 2021 09:58
6e43b0e
to
f36e43e
Compare
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.
LGTM and thanks for taking care, would like to get a final approval from @kulmann before merging
Kudos, SonarCloud Quality Gate passed! |
kulmann
approved these changes
Nov 3, 2021
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.
LGTM 👍
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
null
instead of empty stringdefaultValue
prop that is for now passed asplaceholder
to the input field.Needs UX concept by @kulmann and @tbsbdr
Related Issue
defaultValue
) and makes it more consistent with other components that also emitnull
on clear (which is not part of that table)Motivation and Context
Same as #1634 and #1635
Instead of using native
placeholder
prop on theinput
element, I would propose to introduce thedefaultValue
property which for now usesplaceholder
but 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
clearButtonEnabled
is used nowhere, so this shouldn't break anything in ownCloudChecklist:
Open tasks: