| @@ -112,7 +112,7 @@ | |||
| </div> | |||
| <div class="mat-layout-grid-cell mat-layout-grid-cell-span-4-phone mat-layout-grid-cell-span-4-tablet mat-layout-grid-cell-span-4-desktop"> | |||
| <div class="outlined"> | |||
| <MatAutocompleteList TItem="Brand" FullWidth="true" Label="@i18n["Brand"]" Items="@Brands" @bind-Value="selectedBrand" CustomStringSelector="@(i => i?.Name)"> | |||
| <MatAutocompleteList TItem="Brand" FullWidth="true" Label="@i18n["Brand"]" Items="@Brands" OnTextChanged="setBrandValue" @bind-Value="SelectedBrand" CustomStringSelector="@(i => i?.Name)"> | |||
| <ItemTemplate> | |||
| <div> | |||
| <span>@context?.Name</span> | |||
| @@ -164,12 +164,18 @@ | |||
| private static long MAX_FILE_SIZE = 3145728; //3MB | |||
| private string imgUrl = string.Empty; | |||
| private Boolean loading = false; | |||
| private ColorItem selectedColor; | |||
| private BicycleType selectedBcType; | |||
| private string brandStringValue; | |||
| private Brand selectedBrand; | |||
| // private ElementReference inputTypeFileElement; | |||
| private string imgUrl = string.Empty; | |||
| private Boolean loading = false; | |||
| private Brand SelectedBrand {get { return selectedBrand; } | |||
| set { selectedBrand = (value != null) ? value: new Brand(-999, brandStringValue); } | |||
| } | |||
| private void setBrandValue(string value) { | |||
| brandStringValue = value; | |||
| } | |||
| protected async override void OnInitialized() { | |||
| Console.WriteLine("CurrentCulture is {0}.", CultureInfo.CurrentCulture.Name); | |||
| @@ -182,6 +188,10 @@ | |||
| base.OnInitialized(); | |||
| } | |||
| private Brand getBrand(Brand brand) { | |||
| return brand != null ? brand : new Brand(-999, "Test"); | |||
| } | |||
| private async Task GetColors() { | |||
| await InvokeAsync(async () => { | |||
| await MasterDataService.GetColors(); | |||