Skip to content

Combobox SelectedValue = null DisplayMember not match #21010

@sbeduc163com

Description

@sbeduc163com

Describe the bug

When the initial value of SelectedValue is null, the combobox does not have any option selected

To Reproduce


[ObservableProperty]
public List _comboboxItmes = new List()
{
new (){Id = null, Name = "All"},
new (){Id = 1, Name = "OPTION1"},
new (){Id = 2, Name = "OPTION2"}
};
[ObservableProperty]
private int? _comboboxSelectedValue = null;

Expected behavior

No response

Avalonia version

11.3.12

OS

Windows

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    by-designThe behavior reported in the issue is actually correct.question

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions