Skip to content

[internal] Remove unecessary destructuration - #29354

Merged
mnajdova merged 1 commit into
mui:masterfrom
oliviertassinari:less-code
Oct 28, 2021
Merged

mnajdova merged 1 commit into
mui:masterfrom
oliviertassinari:less-code

Conversation

@oliviertassinari

@oliviertassinari oliviertassinari commented Oct 28, 2021 •

Copy link
Copy Markdown
Member

A follow-up on #29353, it seems that all we needed in the first place is:

-className={clsx(classes.input, inputProps.className, inputPropsProp.className)}
+className={clsx(classes.input, inputProps.className)}

The tests are still green. Fewer LOCs.

@oliviertassinari oliviertassinari added the internal Behind-the-scenes enhancement. Formerly called “core”. label Oct 28, 2021
@oliviertassinari oliviertassinari added the scope: text field Changes related to the text field. label Oct 28, 2021
@mui-pr-bot

mui-pr-bot commented Oct 28, 2021 •

Copy link
Copy Markdown

Details of bundle changes

Generated by 🚫 dangerJS against 0e461b0

@hbjORbj hbjORbj left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I thought classname was also passed here as well: https://github.com/mui-org/material-ui/blob/master/packages/mui-material/src/InputBase/InputBase.js#L528

but actually since we explicitly define className below, this makes sense. :)

@mnajdova mnajdova left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You win 😄

@mnajdova
mnajdova merged commit 2fa90aa into mui:master Oct 28, 2021
@oliviertassinari
oliviertassinari deleted the less-code branch October 28, 2021 13:54
@oliviertassinari oliviertassinari changed the title [core] Remove unecessary destructuration [internal] Remove unecessary destructuration Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Behind-the-scenes enhancement. Formerly called “core”. scope: text field Changes related to the text field.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants