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

[pickers] Add warning when openTo is invalid based on available views #6042

Merged
merged 6 commits into from
Sep 7, 2022

Conversation

LukasTy
Copy link
Member

@LukasTy LukasTy commented Sep 6, 2022

Fixes #6010

Currently we silently fallback to first available view from views array whenever provided/default openTo is not found in the list.
This might cause DX issues.

  • Add console.warn in dev mode whenever openTo does not exist in available views.
  • Improve JSDoc detailing defaults and relationship between openTo and views.

@LukasTy LukasTy added component: pickers This is the name of the generic UI component, not the React module! dx Related to developers' experience labels Sep 6, 2022
@mui-bot
Copy link

mui-bot commented Sep 6, 2022

These are the results for the performance tests:

Test case Unit Min Max Median Mean σ
Filter 100k rows ms 476.3 994.5 633.3 693.82 187.015
Sort 100k rows ms 603.2 1,102.2 1,084.4 966.92 185.063
Select 100k rows ms 209.9 303.1 264.2 254.5 38.208
Deselect 100k rows ms 130.3 296.9 220.3 217.16 55.489

Generated by 🚫 dangerJS against 03ea2de

@LukasTy LukasTy merged commit 1cd7728 into mui:master Sep 7, 2022
@LukasTy LukasTy deleted the warn-incorrect-open-to branch September 7, 2022 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: pickers This is the name of the generic UI component, not the React module! dx Related to developers' experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[pickers] Missing clarity/documentation regarding connection between openTo and views props
4 participants