mui-x
mui-x copied to clipboard
[pickers] Use `PaperProps` in mobile pickers
Part of #6218
To apply styling overrides to both desktop and mobile picker versions popups we currently would need to provide duplicate props:
// overrides style in desktop version
PaperProps={{
sx: {
'.MuiPickersCalendarHeader-label': {
fontSize: 'initial',
},
},
}}
// overrides style in mobile version
DialogProps={{
sx: {
'.MuiPickersCalendarHeader-label': {
fontSize: 'initial',
},
},
}}
After these changes passing only the following prop would apply changes to both desktop and mobile pickers popup/dialog:
PaperProps={{
sx: {
'.MuiPickersCalendarHeader-label': {
fontSize: 'initial',
},
},
}}
These are the results for the performance tests:
Test case | Unit | Min | Max | Median | Mean | σ |
---|---|---|---|---|---|---|
Filter 100k rows | ms | 481.9 | 796 | 611.9 | 632 | 117.891 |
Sort 100k rows | ms | 530.6 | 1,002 | 639.1 | 763.26 | 167.006 |
Select 100k rows | ms | 178.2 | 228.1 | 218.3 | 207.02 | 20.018 |
Deselect 100k rows | ms | 129.6 | 197.9 | 184.5 | 175.18 | 24.293 |
Generated by :no_entry_sign: dangerJS against ef5fe915082334265aa2d91b1b371388b812dc7a
This pull request has conflicts, please resolve those before we can evaluate the pull request.
This PR is going to be replaced by https://github.com/mui/mui-x/pull/6381 to avoid breaking its api just a few days after the introduction of this api.
I checked that with Lukas
Don't know if we should merge it or let's wait for #6381
Too fast :laughing:
Closing this one :+1: