Fixed a few issues
This commit is contained in:
@@ -19,7 +19,8 @@ public class DateEntryViewModelHandler(IServiceFactory serviceFactory) :
|
||||
|
||||
double? width = configuration.Width;
|
||||
|
||||
if (serviceFactory.Create<DateEntryViewModel>([.. args.Parameters, configuration, label, value, width])
|
||||
if (serviceFactory.Create<DateEntryViewModel>(args => args.Initialize(),
|
||||
[.. args.Parameters, configuration, label, value, width])
|
||||
is DateEntryViewModel viewModel)
|
||||
{
|
||||
return Task.FromResult<IItemEntryViewModel?>(viewModel);
|
||||
|
||||
@@ -22,7 +22,8 @@ public class DropdownEntryViewModelHandler(IServiceFactory serviceFactory) :
|
||||
|
||||
DropdownValueViewModel? selected = values.FirstOrDefault(x => x.Value is not null && x.Value.Equals($"{value}"));
|
||||
|
||||
if (serviceFactory.Create<DropdownEntryViewModel>([values, .. args.Parameters, configuration, label, value, width, selected])
|
||||
if (serviceFactory.Create<DropdownEntryViewModel>(args => args.Initialize(),
|
||||
[values, .. args.Parameters, configuration, label, value, width, selected])
|
||||
is DropdownEntryViewModel viewModel)
|
||||
{
|
||||
return Task.FromResult<IItemEntryViewModel?>(viewModel);
|
||||
|
||||
@@ -14,7 +14,8 @@ public class HyperlinkEntryViewModelHandler(IServiceFactory serviceFactory) :
|
||||
string? value = $"{configuration.Value}" ?? "";
|
||||
double? width = configuration.Width;
|
||||
|
||||
if (serviceFactory.Create<HyperlinkEntryViewModel>([.. args.Parameters, configuration, label, value, width])
|
||||
if (serviceFactory.Create<HyperlinkEntryViewModel>(args => args.Initialize(),
|
||||
[.. args.Parameters, configuration, label, value, width])
|
||||
is HyperlinkEntryViewModel viewModel)
|
||||
{
|
||||
return Task.FromResult<IItemEntryViewModel?>(viewModel);
|
||||
|
||||
@@ -18,7 +18,8 @@ public class ItemCreatedHandler(IServiceProvider serviceProvider,
|
||||
IServiceFactory serviceFactory = serviceScope.ServiceProvider.GetRequiredService<IServiceFactory>();
|
||||
IDecoratorService<Item<(Guid, string)>> decoratorService = serviceScope.ServiceProvider.GetRequiredService<IDecoratorService<Item<(Guid, string)>>>();
|
||||
|
||||
if (serviceFactory.Create<ItemNavigationViewModel>(id, name, "Description", true)
|
||||
if (serviceFactory.Create<ItemNavigationViewModel>(args => args.Initialize(),
|
||||
id, name, "Description", true)
|
||||
is ItemNavigationViewModel viewModel)
|
||||
{
|
||||
cache.Add(item);
|
||||
|
||||
Reference in New Issue
Block a user