-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Unable to set html size attribute on <FormControl as="select"> #4499
Comments
That CodeSandbox link looks like a generic vanilla sandbox setup, could you please update it to showcase the issue? |
Still nothing fixed? This 'size' cannot be passed |
You're welcome to create a pr fixing this. I do not know however how we would handle it with custom-select and the size prop that's already in use (never mind that the styling doesn't exist for this use case I think). |
I cannot fix it by myself, I just started using react. Maybe selectSize or htmlSize should be translated to native size? |
@jquense @taion I guess we should support this. It works with TWBS: https://codesandbox.io/s/nifty-kapitsa-qfrhx?file=/index.html Do we call it htmlSize as suggested or something else? |
htmlSize is fine yeah |
I need this feature for a project. Would be glad if I don't have to create a hacky workaround. htmlSize sounds just fine. 👍 😄 |
PR's welcome! |
Yeah I haven't had as much time as I thought. I might be able to fix it later this week but we'll see. Otherwise please do create a pr for it :) |
Closing since https://react-bootstrap.github.io/components/forms/#forms-custom-select |
Describe the bug
The prop
size
on FormControl does not get set on the html element when usingas="select
. It is possible to setmultiple="true"
and use css to set the height, but it is not possible to have a single select that displays the options as a list rather than a dropdown.https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-size
To Reproduce
Reproducible Example
https://codesandbox.io/embed/condescending-surf-dvtyr
Expected behavior
The size attribute be passed to the html
select
element changing the behavior to a multi-line single value selectEnvironment (please complete the following information)
The text was updated successfully, but these errors were encountered: