CodeBeamOrg / CodeBeam.MudBlazor.Extensions

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

MudSelectExtended : Adornment property is not working as expected (positioning Adornment icon on left or right) #348

Open pierregillon opened 4 months ago

pierregillon commented 4 months ago

Hi guys,

The AdornmentIcon is always positionned to the right, even if I explicitly set Adornment="Adornment.Start".


  <MudSelectExtended
        T="string"
        AdornmentIcon="@Icons.Material.Filled.OpenWith"
        Adornment="Adornment.Start">
    </MudSelectExtended>

Result:

image

Can you confirm me the Adornment property is not implemented yet?

mckaragoz commented 4 months ago

Yeah, Adornment is not implemented correctly. Extended component use renderfragments instead.

<MudTextFieldExtended>
    <AdornmentStart>
    </AdornmentStart>

    <AdornmentEnd>
    </AdornmentEnd>
</MudTextFieldExtended>
pierregillon commented 3 months ago

Ok. It seems even AdornmentStart or AdornmentEnd renderfragments are neither implemented.

MudSelectExtended source code:

<MudInputExtended @ref="_elementReference" InputType="InputType.Hidden"
                  Class="@InputClassname" Style="@InputStyle" Margin="@Margin" Placeholder="@Placeholder"
                  Variant="@Variant"
                  TextUpdateSuppression="false"
                  Value="@(Strict && !IsValueInList ? null : Text)" DisableUnderLine="@DisableUnderLine"
                  Disabled="@Disabled" ReadOnly="true" Error="@Error" ErrorId="@ErrorId"
                  Clearable="@Clearable" OnClearButtonClick="(async (e) => await SelectClearButtonClickHandlerAsync(e))"
                  @attributes="UserAttributes" OnBlur="@OnLostFocus" ForceShrink="@ForceShrink"
                  ShowVisualiser="true" DataVisualiserStyle="min-height: 1.1876em">
    <AdornmentEnd>
        <MudIcon Icon="@_currentIcon" Color="@AdornmentColor" Size="@IconSize" @onclick="OnAdornmentClick" />
    </AdornmentEnd>

In order to use:

<MudSelectExtended>
    <AdornmentStart>
    </AdornmentStart>

    <AdornmentEnd>
    </AdornmentEnd>
</MudSelectExtended>

It should have been propagated to underlying MudInputExtended like:

<MudInputExtended 
         ...
        AdornmentStart="@AdornmentStart" 
        AdornmentEnd="@AdornmentEnd" />

Am I right?