Closed
Conversation
Member
|
Also, instead of replacing out the input element, it might be cleaner to just render any children inside the containing div. That way you can just style the star and we're not changing how the input works. What do you think? |
Contributor
Author
|
I'll have a look into the warning tomorrow morning. The only advantage of replacing the input might be in making the dropdown menu consistent with TextField, so in effect the TextField becomes a wrapper for most input type fields. For my "star" use case, rendering the children wouldn't be an issue. I also plan to have a numeric spinner and editor using the same style/api, but these could probably use the input in TextField rather than replacing it. |
Member
|
Does #846 replace this? |
Contributor
Author
|
yes |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
One of my use cases needs to extend TextField to support optional children fields. For example, we have a "star" input control, that lets users highlight a preferred phone number.
I've implemented this in the attached PR assume the child component behaves in the same way as a vanilla input. This has slotted into my project with minimal hassle. It'd be great if this could be merged.