Skip to content
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

[Select] Fix NativeSelect propagating classes to the DOM element #27797

Merged
merged 2 commits into from Aug 17, 2021

Conversation

mnajdova
Copy link
Member

Closes #27655

@mui-pr-bot
Copy link

mui-pr-bot commented Aug 16, 2021

Details of bundle changes (experimental)

Generated by 🚫 dangerJS against 065dc7c

@oliviertassinari oliviertassinari added bug 🐛 Something doesn't work component: select This is the name of the generic UI component, not the React module! labels Aug 16, 2021
@@ -103,4 +103,22 @@ describe('<NativeSelect />', () => {
expect(getByTestId('root')).to.have.class('foo');
expect(getByTestId('root')).to.have.class('bar');
});

it('should not add classes on the DOM element', () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be a conformance check instead? It seems like we need the same implementation in all styled components so it might be best to do a expect(document.querySelector('[classes]')).to.equal(null) to ensure it's fixed everywhere (at least for the rendered UI).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah makes sense. I will create a follow-up PR for this and ensure it pass in all components.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: select This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Native Select serialising object into "classes" attribute on select element
4 participants