-
-
Notifications
You must be signed in to change notification settings - Fork 377
Closed
Labels
Description
I am trying to use an MatAutocompleteList on a dialog edit form and the page crashes every time with the following errors showing in the dev console.
I copied the code from the sample into the root of my page and tried
<MatAutocompleteList Items="@options2" TItem="Car" Label="Select car" CustomStringSelector="@(i => i.Name)" @bind-Value="@value" />
and
<MatAutocompleteList Items="@options2" TItem="Car" Label="Select car" CustomStringSelector="@(i => i.Name)" @bind-Value="@value">
<ItemTemplate>
<div style="display: flex; flex-direction: row; width: 100%;">
<div style="flex: 1;">@context.Name</div>
<div style="width: 150px;">@context.Price$</div>
</div>
</ItemTemplate>
</MatAutocompleteList>
and both autocomplete's loaded. When I put the same code inside of a
<MatDialog @bind-IsOpen="@dialogIsOpen">
<MatDialogTitle>Create</MatDialogTitle>
<MatDialogContent>
<EditForm Model="@obj" OnValidSubmit="@CreateObj">
<DataAnnotationsValidator />
<ValidationSummary />
<MatAutocompleteList Items="@options2" TItem="Car" Label="Select car" CustomStringSelector="@(i => i.Name)" @bind-Value="@value" />
</EditForm>
</MatDialogContent>
<MatDialogActions>
<MatButton OnClick="@(e => { dialogIsOpen = false; })">Cancel</MatButton>
<MatButton OnClick="@CreateObj">Create </MatButton>
</MatDialogActions>
</MatDialog>
it consistently gives the above referenced errors and the razor page will not load.
