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

[fields] Reset query when pressing Backspace or Delete #7855

Merged
merged 1 commit into from
Feb 8, 2023

Conversation

flaviendelangle
Copy link
Member

@flaviendelangle flaviendelangle commented Feb 8, 2023

Part of #7834 (review)
Needs to also by applied on #7842

@flaviendelangle flaviendelangle added bug 🐛 Something doesn't work component: pickers This is the name of the generic UI component, not the React module! labels Feb 8, 2023
@flaviendelangle flaviendelangle self-assigned this Feb 8, 2023
expectInputValue(input, 'YYYY');

fireEvent.change(input, { target: { value: '2' } }); // press "2"
expectInputValue(input, '0002');
Copy link
Member Author

Choose a reason for hiding this comment

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

In next is outputs 0022

@mui-bot
Copy link

mui-bot commented Feb 8, 2023

Messages
📖 Netlify deploy preview: https://deploy-preview-7855--material-ui-x.netlify.app/

These are the results for the performance tests:

Test case Unit Min Max Median Mean σ
Filter 100k rows ms 658.3 1,054.3 682 812.94 158.339
Sort 100k rows ms 696.4 1,151.2 1,151.2 980.26 180.629
Select 100k rows ms 244 360.4 279.8 286.76 42.109
Deselect 100k rows ms 162.3 302.1 244.2 239.92 46.009

Generated by 🚫 dangerJS against ff3612b

Copy link
Member

@LukasTy LukasTy left a comment

Choose a reason for hiding this comment

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

It is a really nice improvement! 👍
But the original linked issue does still seem to exist. 🙈

Screen.Recording.2023-02-08.at.11.14.06.mov

@flaviendelangle
Copy link
Member Author

But the original linked issue does still seem to exist. see_no_evil

From what I understood, the 1st video of your comment shows the bug fixed by #7834 (we end up with Invalid date
And on the 2nd video, I thought it was the bug fixed here

Because entering 0 in empty YY section produces year 20 (2020)

Because this comment you made seems to be what I fixed here.


The first time we are entering date by inputting 02—only after 2 is pressed the value is presented.

For this comment, changing the year min boundary from 1 to 0 would do the trick.
If the min is 1, then 00 is below the min so we are not committing the value inside the section.
For 2 digit year, it's clearly a big bug since we can' select the year 2000...

I'll do a standalone PR to keep the fixes separated 👍

@flaviendelangle flaviendelangle merged commit 51a7c31 into mui:next Feb 8, 2023
@flaviendelangle flaviendelangle deleted the reset-query-backspace branch February 8, 2023 12:00
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!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants