Different width for RadzenDropDown element and DropDown panel

I have the following problem, I want the RadzenDropDown element to be as wide as the country code, for example "DE for Germany.
When the RadzenDropDown is opened, I would like to see the complete content of the image and name. The width of the original RadzenDropDown should be included
not be negotiated.

<RadzenDropDown AllowClear="true" @bind-Value=SelectedCountry AllowFiltering="true" Data=@Countries
LoadData=@LoadData
TextProperty="@nameof(Country.DescriptionLong)"
ValueProperty="@nameof(Country.DescriptionShort)"
Style=@DropDownStyle
TValue="string"
Name="@Name">


@if (!string.IsNullOrWhiteSpace(item.FlagUrl))
{
@item.DescriptionShort
}
@item.DescriptionLong




@if (!string.IsNullOrWhiteSpace(item.FlagUrl) && !OnlyLiterals)
{
@item.DescriptionShort
}
@GetDescription(item)


@code {

private string _selectedCountry = "";

[Parameter] 
public string SelectedCountry { get; set; } = "";

[Parameter] 
public string Name { get; set; } = "";

[Parameter(CaptureUnmatchedValues = true)]
public Dictionary<string, object>? AdditionalAttributes { get; set; }

[Parameter]
public EventCallback<string> SelectedCountryChanged { get; set; }

[Parameter]
public bool OnlyLiterals { get; set; }


private Guid _componentKey = Guid.NewGuid();

private IEnumerable<Country> Countries { get; set; } = new List<Country>();

private string DropDownStyle => OnlyLiterals ? "width: 100px;" : "width: 100%;";

protected override void OnParametersSet()
{
    if (SelectedCountry != _selectedCountry)
    {
        _selectedCountry = SelectedCountry;
        if (SelectedCountry != null)
        {
            _selectedCountry = SelectedCountry;
        }
        SelectedCountryChanged.InvokeAsync(SelectedCountry);
    }
}

protected override void OnInitialized()
{
    Countries = CountriesService.GetEuropeanCountries().OrderBy(c => c.SortOrder).ThenBy(c => c.DescriptionLong);
}

private void LoadData(LoadDataArgs args)
{
    var query = Countries.AsQueryable();

    if (!string.IsNullOrEmpty(args.Filter))
    {
        query = query.Where(c => c.DescriptionLong.ToLower().Contains(args.Filter.ToLower()));
    }

    Countries = query.OrderBy(c => c.SortOrder).ThenBy(c => c.DescriptionLong).ToList();
    InvokeAsync(StateHasChanged);
}

private string GetDescription(Country country)
{
    return OnlyLiterals ? country.DescriptionShort.Substring(3) : country.DescriptionLong;
}

}

Hi @Klaus,

You can use the PopupStyle property to specify the width and height:

<RadzenDropDown PopupStyle="width: 400px" ...>

Thanks for the quick reply. Basically it works that the width of the popup is different to the control.
However, I now get the following result (see pictures). The frame of the popups must be as wide as the popup.


Another small addition, if I choose the following PopupStyle="min-width: 400px; width: fit-content; height: fit-content; max-height: 400px; ", I would also get an unsightly result, see picture.

See my answer in the other thread: Customize the width of the dropdown panel - #4 by yordanov