CodeBeamOrg / CodeBeam.MudBlazor.Extensions

Useful third party extension components for MudBlazor, from the contributors.

Home Page:https://mudextensions.codebeam.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MudSelectExtended Interactable When Disabled

PlayerModu opened this issue · comments

When I set disabled to true on a MudSelectExtended, the user can still click it and it shows interaction colours but no dropdown or dropdown content is shown. Ideally it shouldn't be interactable at all if its been disabled.

using this code in the TryMudExtensions shows the bug:

<MudGrid>
    <MudItem xs="12" sm="8" Class="d-flex gap-4">
        <MudSelectExtended MultiSelection="true" ItemCollection="_states" SearchBox="true" SearchBoxAutoFocus="true" 
            T="string" Label="Standard Search" AnchorOrigin="Origin.BottomCenter" Variant="Variant.Outlined" 
            SearchBoxClearable="true" Disabled="true" />
    </MudItem>
</MudGrid>


@code {
    private string[] _states =
    {
        "Alabama", "Alaska", "American Samoa", "Arizona",
        "Arkansas", "California", "Colorado", "Connecticut",
        "Delaware", "District of Columbia", "Federated States of Micronesia",
    };
}

I've taken a look through the mudblazor and mudextension code locally to try and try narrow down whats going but I cannot figure out why it's doing this sorry.

Having looked at the MudComboBox component, which uses the same InputControl underneath but does some different stuff with the MudInputControl params, that component doesn't suffer from this problem.

Having looked at the MudComboBox component, which uses the same InputControl underneath but does some different stuff with the MudInputControl params, that component doesn't suffer from this problem.

MudComboBox also has the same problem if Editable is false.

Ah okay thank you for confirming, seems to be a deeper issue maybe within those input control components then 🤔

@mckaragoz do you have any further thoughts on this at all? I'm happy to help investigate if you have any theories or places to focus on? This is causing us a few problems with user confusion so I'd be more than happy to assist with finding a resolution.

It look like MudInputExtended works properly with disabled. So it should be a select and select extended css classes conflict.

On TryMudExtensions I put a MudSelectedExtended and MudSelect next to each other, both set to Disabled="true", to try compare in the console:

image

I haven't been able to uncover anything obviously clashing in the css. I'm wondering if the extra wrappers around the input for the MudSelectExtended aren't adhering to the Disabled logic?

@mckaragoz has there been any progress on this issue at all?