Skip to content

MudComboBox Search Selection Conversion Type Error #256

Open
@PlayerModu

Description

@PlayerModu

When using the MudComboBox with T of an object type, and using the default search box, I am seeing a type conversion error underneath the component when I select one or more of the options in the list. However I do not see this type conversion error if I scroll through and select the same objects from the list manually.

Error: "Conversion to type PersonDto not implemented"

I've tried to include the relevant code below:

 private IEnumerable<PersonDto> _peopleToOverwrite;
 private List<PersonDto> _PeopleList;
..
<MudComboBox T="PersonDto"
	@bind-SelectedValues="_peopleToOverwrite"
	Label="People"
	Clearable="true"
	ShowCheckbox="true"
	Editable="true"
	MultiSelection="true"
	Margin="Margin.Dense">
	@foreach (var item in _PeopleList)
	{
		<MudComboBoxItem Value="@item"
			Text="@("P0" + @item.Name+ " - " + @item.City)">
			@item
		</MudComboBoxItem>
	}
</MudComboBox>

Please can you advise? This is a hard-blocker to me using this component. Given the docs only show an example of a simple string type, I can't see if it's a me issue or a component issue.

Notes - I'm using the latest version of this library and MudBlazor

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions