Skip to content

MudTable: Fix loading indicator visibility in mobile layout#12778

Merged
danielchalmers merged 4 commits intodevfrom
copilot/fix-mudtable-loading-mobile
Mar 2, 2026
Merged

MudTable: Fix loading indicator visibility in mobile layout#12778
danielchalmers merged 4 commits intodevfrom
copilot/fix-mudtable-loading-mobile

Conversation

Copy link
Contributor

Copilot AI commented Mar 1, 2026

MudTable's Loading progress indicator was invisible when the table switched to its mobile card layout, regardless of breakpoint setting.

Root causes

Two bugs in MudTable.razor:

  1. else if (Loading) branch (tables without HeaderContent/Columns): loading <tr> had class="mud-table-row", which is explicitly display: none in the mobile CSS mixin — progress bar was always hidden.

  2. Normal branch (tables with HeaderContent): loading <tr> had no class, so it received no block-level styling in the overridden mobile table layout — visually broken/invisible.

Changes

  • MudTable.razor: Both loading <tr> elements now use class="mud-table-loading-row" instead of mud-table-row (or no class).

  • _table.scss: Added .mud-table-loading-row rule inside table-display-smalldevices mixin — renders the row and its <th> as full-width block elements in mobile view:

    .mud-table-loading-row {
      display: block;
      th {
        display: block;
        padding: 0;
      }
    }
  • TableTests.cs: Added LoadingRowHasMudTableLoadingRowClass test asserting the loading row carries the new class.

Original prompt

This section details on the original issue you should resolve

<issue_title>MudTable.Loading doesn't work in mobile view</issue_title>
<issue_description>### Bug type

Component

Component name

MudTable

What happened?

When in mobile layout (Breakpoint.Xs), the Loading parameter of MudTable does nothing. This can be seen in the first example from the docs.

Desktop view:
image

Mobile view:
image

Expected behavior

A loading indicator is shown on both desktop and mobile layouts.

Unresolved question: Is the same type of loading indicator the best option on mobile? I suspect it will suffer from this problem more than the desktop version already does.

Reproduction link

https://try.mudblazor.com/snippet/mkGSEPFpwztAMmPp

Reproduction steps

  1. Go to the first demo on https://mudblazor.com/components/table#default-table (or https://try.mudblazor.com/snippet/mkGSEPFpwztAMmPp).
  2. Enable the "Show Loading" switch.
  3. Resize your browser window so that the table switches to mobile layout.

Relevant log output

No response

Version (bug)

6.12.0

Version (working)

No response

What browsers are you seeing the problem on?

Firefox, Chrome

On what operating system are you experiencing the issue?

Windows

Pull Request

  • I would like to do a Pull Request

Code of Conduct

  • I agree to follow this project's Code of Conduct</issue_description>

Comments on the Issue (you are @copilot in this section)

@danielchalmers Anyone able to work on a PR for this?

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: danielchalmers <7112040+danielchalmers@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix MudTable loading indicator in mobile view Fix MudTable.Loading not visible in mobile (small-device) layout Mar 1, 2026
@danielchalmers danielchalmers marked this pull request as ready for review March 1, 2026 19:58
@mudbot mudbot bot changed the title Fix MudTable.Loading not visible in mobile (small-device) layout MudTable: Fix loading indicator visibility in mobile layout Mar 1, 2026
@mudbot mudbot bot added bug Unexpected behavior or functionality not working as intended device: mobile Only affects small viewports or touch screens labels Mar 1, 2026
@danielchalmers danielchalmers requested a review from versile2 March 1, 2026 20:22
@danielchalmers
Copy link
Member

Recording.2026-03-01.142606.mp4

@danielchalmers danielchalmers requested a review from Anu6is March 1, 2026 23:07
Copy link
Contributor

@versile2 versile2 left a comment

Choose a reason for hiding this comment

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

I can dive in more if need be but probably don't need any additional css here just update the class layout in mobile view

…verride for .mud-table-loading-row from _table.scss.

Kept the class-based markup fix from commit fc46c0e, so mobile visibility is handled via row class layout rather than new SCSS rules.
Copy link
Contributor

@versile2 versile2 left a comment

Choose a reason for hiding this comment

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

Confirmed loading now displays on mobile.

This was referenced Mar 4, 2026
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 device: mobile Only affects small viewports or touch screens

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MudTable.Loading doesn't work in mobile view

3 participants