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

[TimePicker] Don't merge with previous value when new value is not valid #4847

Merged
merged 3 commits into from
May 11, 2022

Conversation

flaviendelangle
Copy link
Member

@flaviendelangle flaviendelangle commented May 11, 2022

Fixes #4751

Behavior before
Behavior after

To test it fully:

  1. Focus the end of the input
  2. Press the back key until you remove the 3
  3. Type 2 AM

The date logged below should still be in 2018

@flaviendelangle flaviendelangle added bug 🐛 Something doesn't work component: pickers This is the name of the generic UI component, not the React module! component: TimePicker The React component. labels May 11, 2022
@flaviendelangle flaviendelangle self-assigned this May 11, 2022
@flaviendelangle flaviendelangle added the regression A bug, but worse label May 11, 2022
@mui-bot
Copy link

mui-bot commented May 11, 2022

These are the results for the performance tests:

Test case Unit Min Max Median Mean σ
Filter 100k rows ms 247.9 613.2 302.9 394.6 150.703
Sort 100k rows ms 463.6 819.9 802.3 703.32 139.739
Select 100k rows ms 134.2 200.8 182.3 175.82 23.056
Deselect 100k rows ms 103.3 295.3 224 198.02 80.019

Generated by 🚫 dangerJS against 5ede2c8

Copy link
Member

@alexfauquette alexfauquette left a comment

Choose a reason for hiding this comment

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

👍

Seems we will have to lose the habit of using != null when dealing with pickers

@flaviendelangle
Copy link
Member Author

Seems we will have to lose the habit of using != null when dealing with pickers

Yes 😬
The adapter aspect of the pickers is awesome, but it forces a certain mindset that we don't fully have yet 😅

@flaviendelangle flaviendelangle merged commit 5d8d4fe into mui:master May 11, 2022
@flaviendelangle flaviendelangle mentioned this pull request May 11, 2022
@flaviendelangle flaviendelangle deleted the time-picker-crash-luxojn branch May 11, 2022 13:29
alexfauquette pushed a commit to alexfauquette/mui-x that referenced this pull request Aug 26, 2022
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: pickers This is the name of the generic UI component, not the React module! component: TimePicker The React component. regression A bug, but worse
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[TimePicker] TimePicker with Luxon throws NaN when editing via input box
3 participants