-
Hi! I'm trying to use the DropdownList component and I want to disable it, how can I do this ? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 9 replies
-
Don't worry we will not judge. If you don't ask how else you will learn :) I checked and It seems I forgot to include the DropodownList is internally very simple, you should be able to make it without any problems: <Dropdown @ref="@dropdownRef" ElementId="@ElementId" Class="@Class" Style="@Style" Attributes="@Attributes">
<DropdownToggle @ref="@dropdownToggleRef" Color="@Color" TabIndex="@TabIndex">@ChildContent</DropdownToggle>
<DropdownMenu>
@if ( Data != null )
{
foreach ( var item in Data )
{
var text = TextField?.Invoke( item );
var value = ValueField != null ? ValueField.Invoke( item ) : default;
<DropdownItem Clicked="@HandleDropdownItemClicked" Value="@value">@text</DropdownItem>
}
}
</DropdownMenu>
</Dropdown> |
Beta Was this translation helpful? Give feedback.
Don't worry we will not judge. If you don't ask how else you will learn :)
I checked and It seems I forgot to include the
Disabled
parameter on aDropdownList
. Unfortunately, until I fix it your only option is to build a dropdown menu from scratch using theDropdown
component(s).DropodownList is internally very simple, you should be able to make it without any problems: