-
-
Notifications
You must be signed in to change notification settings - Fork 175
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
Allow passing className for the input element #594
Comments
I’ll try again but when I tried this it just the class names in the div
still.
…On Thu, Oct 12, 2023 at 6:05 PM Amumu ***@***.***> wrote:
Using classNames.input #570
<#570> Does it meet
your requirements?
—
Reply to this email directly, view it on GitHub
<#594 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAARITS5YCPXGOXMIM6GDJTX7CHV7ANCNFSM6AAAAAA56HB2WY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Someone deleted their comment but they asked if <InputNumber
...
className={styles.numberInput}
classNames={{
input: clsx(styles.numberInput, formsStyles.textFormField, className, {
[formsStyles.error]: isError
})
}}
/> The classes like <div class="rc-input-number _numberInput_1wynb_1 _textFormField_gqvlq_23 dark-blue-regular-text _numberInput_1wynb_1"><div class="rc-input-number-handler-wrap"><span unselectable="on" role="button" aria-label="Increase Value" aria-disabled="false" class="rc-input-number-handler rc-input-number-handler-up"><span unselectable="on" class="rc-input-number-handler-up-inner"></span></span><span unselectable="on" role="button" aria-label="Decrease Value" aria-disabled="false" class="rc-input-number-handler rc-input-number-handler-down"><span unselectable="on" class="rc-input-number-handler-down-inner"></span></span></div><div class="rc-input-number-input-wrap"><input autocomplete="off" role="spinbutton" step="1" name="quantity" required="" class="rc-input-number-input" value=""></div></div> |
I'll try to fix it in the next week or two. |
I would appreciate it, we're blocked although I have workarounds I can do if needed. |
Any luck? |
It'is the time. |
It looks like you can do this: .input-wrapper input {
/* input style */
} <InputNumber classNames={{
input: 'input-wrapper'
}} /> |
I've tried to explain why that's not ideal for us. Yes, we can design our code this way, but we've already built all of our input styles with the assumption that we can apply a class directly the input because the library we use for most inputs, blueprintjs, allows it. So it's either we duplicate and rewrite our css to work around this issue, or we wait until this is fixed, or fork the repo, or look for alternatives, etc. I was just hoping it could be fixed, as that would benefit many users. |
Current behavior may be intentional. CC @MuxinFeng @MadCcc |
If so I'm asking for a way to add a class name to the actual |
I need to set specific className(s) on the
input
element itself, not any of the wrapped DIVs. We have existing classes for styling form fields but they expectdisabled
attributes which are only available on the input itself.I thought
classNames.input
would do it, but that doesn't appear to work.A few people have asked for this before the PRs were closed without explanation. #262 #95
The text was updated successfully, but these errors were encountered: