| </div> | </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="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"> | <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> | <ItemTemplate> | ||||
| <div> | <div> | ||||
| <span>@context?.Name</span> | <span>@context?.Name</span> | ||||
| private static long MAX_FILE_SIZE = 3145728; //3MB | private static long MAX_FILE_SIZE = 3145728; //3MB | ||||
| private string imgUrl = string.Empty; | |||||
| private Boolean loading = false; | |||||
| private ColorItem selectedColor; | private ColorItem selectedColor; | ||||
| private BicycleType selectedBcType; | private BicycleType selectedBcType; | ||||
| private string brandStringValue; | |||||
| private Brand selectedBrand; | 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() { | protected async override void OnInitialized() { | ||||
| Console.WriteLine("CurrentCulture is {0}.", CultureInfo.CurrentCulture.Name); | Console.WriteLine("CurrentCulture is {0}.", CultureInfo.CurrentCulture.Name); | ||||
| base.OnInitialized(); | base.OnInitialized(); | ||||
| } | } | ||||
| private Brand getBrand(Brand brand) { | |||||
| return brand != null ? brand : new Brand(-999, "Test"); | |||||
| } | |||||
| private async Task GetColors() { | private async Task GetColors() { | ||||
| await InvokeAsync(async () => { | await InvokeAsync(async () => { | ||||
| await MasterDataService.GetColors(); | await MasterDataService.GetColors(); |