Skip to content

MudAutocomplete, MudSelect: Fix Focus and Clear#10740

Merged
danielchalmers merged 19 commits intoMudBlazor:devfrom
versile2:fix/autocompletefocus
Jan 30, 2025
Merged

MudAutocomplete, MudSelect: Fix Focus and Clear#10740
danielchalmers merged 19 commits intoMudBlazor:devfrom
versile2:fix/autocompletefocus

Conversation

@versile2
Copy link
Copy Markdown
Contributor

@versile2 versile2 commented Jan 28, 2025

Description

Resolves #10733 by allowing the Clear button to actually clear the values
Resolves #10705 by reordering the focus logic
Resolves #10718 by removing additional click handler
Resolves #10739

How Has This Been Tested?

Unit tests passing after changing Click(s) to MouseDown(s), Visual tests done with video in comments.

Type of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation (fix or improvement to the website or code docs)

Checklist

  • The PR is submitted to the correct branch (dev).
  • My code follows the code style of this project.
  • I've added relevant tests.

@github-actions github-actions bot added bug Unexpected behavior or functionality not working as intended PR: needs review labels Jan 28, 2025
Copy link
Copy Markdown
Member

@danielchalmers danielchalmers left a comment

Choose a reason for hiding this comment

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

small api tweak to match mudmask

@danielchalmers
Copy link
Copy Markdown
Member

Are there any other controls that have a clear button that are afflicted by this?

from ValueTask to Task

Co-authored-by: Daniel Chalmers <daniel.chalmers@outlook.com>
@versile2
Copy link
Copy Markdown
Contributor Author

Are there any other controls that have a clear button that are afflicted by this?

none that I'm aware of or that has been reported

@danielchalmers
Copy link
Copy Markdown
Member

Sorry, is AutocompleteRetainFocusTest the right example or is it for the other PR? I'm seeing a message box when I try to clear the field.

Video3.mp4

@danielchalmers
Copy link
Copy Markdown
Member

@ScarletKuro Could you take a look at the property logic when you get a chance?

@versile2
Copy link
Copy Markdown
Contributor Author

Sorry, is AutocompleteRetainFocusTest the right example or is it for the other PR? I'm seeing a message box when I try to clear the field.
Video3.mp4

No just the Docs autocomplete first example is what I used here. I did go ahead and add the logic in autocompleterefocustest to prevent popup when the value is empty

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.83%. Comparing base (c5b4b49) to head (1da91b9).
Report is 5 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev   #10740   +/-   ##
=======================================
  Coverage   91.83%   91.83%           
=======================================
  Files         427      427           
  Lines       13425    13428    +3     
  Branches     2589     2591    +2     
=======================================
+ Hits        12329    12332    +3     
  Misses        523      523           
  Partials      573      573           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Copy Markdown
Member

@danielchalmers danielchalmers left a comment

Choose a reason for hiding this comment

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

Working on my end 👍

@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Member

@ScarletKuro ScarletKuro left a comment

Choose a reason for hiding this comment

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

LGTM, I haven't tested personally so feel free to merge if ya confident

@danielchalmers danielchalmers changed the title MudAutocomplete: Fix Focus and Clear MudAutocomplete, MudSelect: Fix Focus and Clear Jan 30, 2025
@danielchalmers danielchalmers merged commit d88dbb2 into MudBlazor:dev Jan 30, 2025
@versile2 versile2 deleted the fix/autocompletefocus branch February 3, 2025 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Unexpected behavior or functionality not working as intended

Projects

None yet

4 participants