Skip to content

MudDataGrid: Form Dialog Focus#11379

Merged
danielchalmers merged 1 commit intoMudBlazor:devfrom
versile2:enhance/datagrid11374
May 24, 2025
Merged

MudDataGrid: Form Dialog Focus#11379
danielchalmers merged 1 commit intoMudBlazor:devfrom
versile2:enhance/datagrid11374

Conversation

@versile2
Copy link
Contributor

Description

Resolves part of #11374 by adding FirstChild to the default focus of the MudDialog when DataGrid uses EditMode.EditForm

How Has This Been Tested?

Visually

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 enhancement Adds a new feature or enhances existing functionality (not fixing a defect) in the main library PR: needs review labels May 21, 2025
@versile2 versile2 requested a review from ScarletKuro May 21, 2025 14:04
@sonarqubecloud
Copy link

@codecov
Copy link

codecov bot commented May 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.11%. Comparing base (53ac2f9) to head (2c01793).
Report is 13 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev   #11379      +/-   ##
==========================================
- Coverage   91.11%   91.11%   -0.01%     
==========================================
  Files         465      465              
  Lines       14402    14401       -1     
  Branches     2785     2785              
==========================================
- Hits        13122    13121       -1     
  Misses        643      643              
  Partials      637      637              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@versile2
Copy link
Contributor Author

Also 2 questions. Not sure who would know.

  1. Why is the Mudglobal.DialogDefaults.DefaultFocus set to DefaultFocus.Element?
  2. What is DefaultFocus.Element for since it actually does nothing but focuses an empty div

@danielchalmers
Copy link
Member

danielchalmers commented May 21, 2025

Also 2 questions. Not sure who would know.

  1. Why is the Mudglobal.DialogDefaults.DefaultFocus set to DefaultFocus.Element?
  2. What is DefaultFocus.Element for since it actually does nothing but focuses an empty div

I think the point of Element is to focus the dialog itself so you can start tabbing to elements inside if it, but I might be wrong. I'd like to look into changing it to FirstChild by default for v9

@versile2
Copy link
Contributor Author

Also 2 questions. Not sure who would know.

  1. Why is the Mudglobal.DialogDefaults.DefaultFocus set to DefaultFocus.Element?
  2. What is DefaultFocus.Element for since it actually does nothing but focuses an empty div

I think the point of Element is to focus the dialog itself so you can start tabbing to elements inside if it. I might be wrong. I'd like to look into changing it to FirstChild by default for v8

That makes total sense, I think the Docs or intellisense at least could use a nudge

@ScarletKuro ScarletKuro linked an issue May 21, 2025 that may be closed by this pull request
2 tasks
@danielchalmers danielchalmers merged commit 86dd92f into MudBlazor:dev May 24, 2025
7 checks passed
@versile2 versile2 deleted the enhance/datagrid11374 branch July 16, 2025 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Adds a new feature or enhances existing functionality (not fixing a defect) in the main library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Submit form on Enter key in MudDataGrid edit dialog

2 participants