question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MudTable on Mobile device: broken layout?

See original GitHub issue

I have a simple MudTable:

<MudTable Items="_conferences" Hover="true" Elevation="3" Filter="new Func<Conference, bool>(FilterByLocalSearch)">
            <ToolBarContent>
                <MudTextField @bind-Value="_searchString" Placeholder="Suchen" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.Search" IconSize="Size.Medium" Class="mr-2"></MudTextField>
                <MudSelect T="Speaker" Label="Speaker" ValueChanged="FilterBySpeakerAsync" Class="mr-2">
                    @foreach (var speaker in _speakers)
                    {
                        <MudSelectItem T="Speaker" Value="speaker">@speaker.FirstName @speaker.LastName</MudSelectItem>
                    }
                </MudSelect>
                <MudDatePicker Culture="@CultureInfo.GetCultureInfo("de-De")" DateFormat="dd.MM.yyyy" Label="Ab (Datum)" DateChanged="FilterByStartDateAsync" DisableToolbar="true" Editable="true"  Class="mr-2" />
                <MudDatePicker Culture="@CultureInfo.GetCultureInfo("de-De")" DateFormat="dd.MM.yyyy" Label="Bis (Datum)" DateChanged="FilterByEndDateAsync" DisableToolbar="true" Editable="true"  Class="mr-2" />
            </ToolBarContent>
            <HeaderContent>
                <MudTh Style="color: white; background-color: #ff584f">Titel</MudTh>
                <MudTh Style="color: white; background-color: #ff584f">Ort</MudTh>
                <MudTh Style="color: white; background-color: #ff584f">Zeitraum</MudTh>
                <MudTh Style="color: white; background-color: #ff584f">Link</MudTh>
            </HeaderContent>
            <RowTemplate>
                <MudTd DataLabel="Titel">@context.Title</MudTd>
                <MudTd DataLabel="Ort">@context.City</MudTd>
                <MudTd DataLabel="Zeitraum">@context.DateFrom.ToShortDateString() - @context.DateTo.ToShortDateString()</MudTd>
                <MudTd DataLabel="Link"><MudLink Href="@context.Url" Underline="Underline.Always">@context.Url</MudLink></MudTd>
            </RowTemplate>
        </MudTable>

When using it on mobile, the text is not aligned properly:

image

You can see it live in action: https://ttconftoolblazorwasm.azurewebsites.net/conferences

The code can be found here - if the entire page is of interest: https://github.com/thinktecture/ttconftool-blazor/blob/main/UI/Conferences/Conferences.razor

Thanks!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:17 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
ChristianWeyercommented, Mar 8, 2021

That looks just like it 😄 Thanks.

1reaction
Garderobencommented, Mar 8, 2021

@ChristianWeyer Like this maybe? https://try.mudblazor.com/snippet/QawFOHEMTgVSLsDw I will release 5.0.5 and 2.0.5 in about 30-60min to fix that nasty TextField/Input bug on the DatePickers that came with 5.0.4

Read more comments on GitHub >

github_iconTop Results From Across the Web

Table
The default table displays your data in simple rows and is responsive, it breaks into mobile layout on Breakpoint.Xs unless changed.
Read more >
5.0.5 Milestone
Blazor Component Library based on Material design with an emphasis on ease of use. Mainly written in C# with Javascript kept to a...
Read more >
MudBlazor: How to create a custom table with MudTable ...
But I can't figure out how to actually do it using the MudBlazor library. In HTML, I used rowspan and colspan to achieve...
Read more >
CSS is not working Blazor MudTable Inline edit
Hi, i have added a mudtable with inline edit and delete function.Problem is when i am clicking the second row for editing un...
Read more >
Construction Technology of Large Diameter Underwater Shield ...
3) Emergency plan Due to the great risks in the construction of shield crossing ... it indicates that the mud pressure has broken...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found