-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
Emotion fix select #34659
Emotion fix select #34659
Conversation
@@ -115,7 +115,7 @@ const Select = React.forwardRef(function Select(inProps, ref) { | |||
}, | |||
...(multiple && native && variant === 'outlined' ? { notched: true } : {}), | |||
ref: inputComponentRef, | |||
className: clsx(InputComponent.props.className, className), | |||
className: clsx(classes.select, InputComponent.props.className, className), |
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.
In this component there is no root
class. select
is expected to be used instead.
1fccbcb
to
9abe2c2
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.
Hey, sorry for the delay, it missed my radar 😁 This class haven't been handled before in this file, so we may be doing something wrong here. Previously this was handled here: https://github.com/mui/material-ui/blob/master/packages/mui-material/src/Select/SelectInput.js#L521 If we change the behavior, we likely need to remove the classes.select
from the SelectInput
logic no?
No need to apoogies @mnajdova , thank you for reveiwing! This case is no different from every other case, I applied the same fix.
I got you. I was worried by this as well. Only to realize that it whas done like that everywhere where there is a sub component (take for example I hope I'm not missing the point. Have a good day 😊 |
A little up on this :) |
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.
I apologize for the delay. The problem with this PR is that the classes.select
is now being handled two times (by two different components) and applied on two different slots. See https://codesandbox.io/s/damp-cookies-3t3wrz?file=/src/App.tsx
This is why I proposed for this to be handled in the NativeSelectInput
and SelectInput
components if possible. If this is not possible, we should remove the logic in those components before handling it. In my opinion this class should be applied here:
classes: inputProps ? deepmerge(classes, inputProps.classes) : classes, |
@mnajdova, thank you for coming back to me on this. |
@garronej May I inquire if there are any planned updates regarding this PR? |
Thank you for bringing this to my attention. I've yet to address @mnajdova's last message as it remains in my backlog, and I haven't had the opportunity to investigate it. However, I put a great deal of care into crafting this PR. I believe I had valid reasons for the choices I made. |
@garronej I am closing this PR since it is inactive. If you want to continue working on this, you can create a new PR pointing to |
Hello @mnajdova,
Sorry to bother you again, this is yet another following up to 33205.
It was reported to me that the
<Select />
component hadn't been fixed by my previous PR.Best regards,