CodeBeamOrg / CodeBeam.MudBlazor.Extensions

Useful third party extension components for MudBlazor, from the contributors.
https://mudextensions.codebeam.org/
MIT License
363 stars 62 forks source link

Checkboxes appear above the ToString template in MudSelectExtended #187

Closed digitaldias closed 1 year ago

digitaldias commented 1 year ago

Not sure if it is me, or if it could be something with MudBlazor.Extensions, so posting this. I'm new to these extensions, so apologies if this has been asked before. I looked through all the current issues but found nothing similar so here goes.

My current versions:

        <PackageReference Include="MudBlazor" Version="6.2.1" />
        <PackageReference Include="CodeBeam.MudBlazor.Extensions" Version="6.4.9" />        

Given the following use of MudSelectExtended:

        <MudSelectExtended 
            MultiSelection="true"             
            ItemCollection="Filter.FilterOptions.Suppliers"
            SearchBoxAutoFocus="true"
            T="Supplier" 
            SearchFunc="@(new Func<Supplier, string, bool>(SearchSuppliers))"
            Label="@Loc["Suppliers"]"                  
            AnchorOrigin="Origin.BottomCenter"            
            Variant="Variant.Text"
            SearchBoxPlaceholder="@Loc["Supplier name"]"
            SearchBox="true"
            HelperTextOnFocus="true"
            SearchBoxClearable="true"
            SelectedValuesChanged="OnSelectedSuppliersChanged"
            ValuePresenter="MudExtensions.Enums.ValuePresenter.Chip"
            ChipCloseable="true"
            ChipVariant="Variant.Filled"
            ChipSize="Size.Small"
            Virtualize="true"    
            HelperText="Filter on suppliers"   
            MultiSelectionAlign="Align.Start"            
            ToStringFunc="@(s => s is null ? "" : s.Name.Length > 20 ? s.Name.Substring(0, 20) + "..." : s.Name)">
        </MudSelectExtended>

Renders as follows: image

The MudSelectExtended is inside a MudDrawer of With=650 A Supplier is a class with a long and a name

Our theme makes the following changes to MudBlazor Typography:

    {
        Default = new Default
        {
            FontFamily = new[] { "Euclid Circular A", "Open Sans", "sans-serif" },
            FontSize = "16px",
        };

        H1.Set(fontSize: "72px", fontWeight: FontWeight.SemiBold);
        H2.Set(fontSize: "64px",  fontWeight: FontWeight.Medium);
        H3.Set(fontSize: "48px",  fontWeight: FontWeight.SemiBold);
        H4.Set(fontSize: "36px",  fontWeight: FontWeight.Medium);
        H5.Set(fontSize: "24px",  fontWeight: FontWeight.Regular);
        H6.Set(fontSize: "18px",  fontWeight: FontWeight.Medium);

        Subtitle1.Set(fontWeight: 400);
        Subtitle2.Set(fontWeight: 600);
        Caption.Set(fontSize: "12px", fontWeight: 600);
    }

Any/all tips welcome, or is this currently broken?

joost00719 commented 1 year ago

Do you have any custom css files in your project? Check with devtools if you have any non-mudblazor css applied to the elements.

(if the dropdown keeps closing, add a javascript script with an event-listener on some key, which triggers the debugger.

digitaldias commented 1 year ago

No custom css anywhere aside from loading up the fonts. The list of suppliers is around 800 items long

digitaldias commented 1 year ago

Yes, you can close