CodeBeam.MudBlazor.Extensions icon indicating copy to clipboard operation
CodeBeam.MudBlazor.Extensions copied to clipboard

MudSelectExtended Interactable When Disabled

Open PlayerModu opened this issue 1 year ago • 9 comments
trafficstars

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.

PlayerModu avatar Nov 30 '23 12:11 PlayerModu

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.

PlayerModu avatar Dec 01 '23 14:12 PlayerModu

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.

PlayerModu avatar Dec 04 '23 13:12 PlayerModu

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.

mckaragoz avatar Dec 11 '23 10:12 mckaragoz

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

PlayerModu avatar Dec 11 '23 11:12 PlayerModu

@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.

PlayerModu avatar Dec 13 '23 19:12 PlayerModu

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

mckaragoz avatar Dec 15 '23 20:12 mckaragoz

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?

PlayerModu avatar Dec 15 '23 21:12 PlayerModu

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

PlayerModu avatar Apr 12 '24 08:04 PlayerModu