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
fix(Input): Added htmlSize
prop to set native size
attribute
#1419
Conversation
maybe we can leave reason: it is way more common to use the |
size
prop to not conflict with native size
attributehtmlSize
prop to set native size
attribute
Great idea! This has been updated. |
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.
Everything looks fine, I just have a question. The native size
attribute of <input>
is to determine how many characters will be visible right? However, because we have inline-size = 100%
within our <Input/>
component styling, setting this size
(or htmlSize
) will not do anything unless user specifically override our component inline-size
styling. Is this intended?
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.
It is intended that our input fills up the width of the container, because otherwise it would have some weird default width. So yeah, to make use of this |
Could we apply |
Overengineering it imo. I do not expect this attribute to be used commonly enough to justify the extra code. If somebody finds the current behavior confusing, we can always revisit in the future. Oh and slight typo in |
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 :D
Changes
Added
htmlSize
prop to theInput
component which handles the nativesize
attribute in<input>
.Closes #973
Testing
Added new unit test
Docs
Updated documentation to explain new prop
Changeset added