mui-x icon indicating copy to clipboard operation
mui-x copied to clipboard

[pickers] Use `PaperProps` in mobile pickers

Open LukasTy opened this issue 2 years ago • 2 comments

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',
    },
  },
}}

LukasTy avatar Sep 20 '22 10:09 LukasTy

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

mui-bot avatar Sep 20 '22 10:09 mui-bot

This pull request has conflicts, please resolve those before we can evaluate the pull request.

github-actions[bot] avatar Sep 21 '22 08:09 github-actions[bot]

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

flaviendelangle avatar Oct 05 '22 09:10 flaviendelangle

Don't know if we should merge it or let's wait for #6381

alexfauquette avatar Oct 05 '22 09:10 alexfauquette

Too fast :laughing:

flaviendelangle avatar Oct 05 '22 09:10 flaviendelangle

Closing this one :+1:

flaviendelangle avatar Oct 10 '22 08:10 flaviendelangle