1 write to Input
Aspire.Dashboard (1)
Model\Interaction\InputViewModel.cs (1)
48
Input
= input;
25 references to Input
Aspire.Dashboard (24)
Components\Dialogs\InteractionsInputDialog.razor.cs (11)
139
_validationMessages.Add(field, $"{inputModel.
Input
.Label} is required.");
160
if (inputModel.
Input
.UpdateStateOnChange)
175
var fieldName = inputModel.
Input
.InputType switch
186
return inputModel.
Input
.Required &&
187
inputModel.
Input
.InputType != InputType.Boolean &&
240
inputModel.
Input
.MaxFileSize > 0 ? inputModel.
Input
.MaxFileSize : InputViewModel.DefaultMaxUploadedFileBytes;
244
if (!string.IsNullOrEmpty(inputModel.
Input
.Placeholder))
246
return inputModel.
Input
.Placeholder;
249
return inputModel.
Input
.AllowMultipleFiles
270
var fileId = await Content.DashboardClient.UploadFileAsync(stream, file.Name, file.Size, Content.Interaction.InteractionId, inputModel.
Input
.Name, _disposalCts.Token);
Model\Interaction\InputViewModel.cs (13)
43
if (
Input
is not null && !ShouldUseIncomingValue(
Input
, input))
45
input.Value =
Input
.Value;
92
public string InputKey => $"{
Input
.Name}_{ChoiceVersion}";
117
get =>
Input
.Value;
118
set =>
Input
.Value = value ?? string.Empty;
124
get => bool.TryParse(
Input
.Value, out var result) && result;
125
set =>
Input
.Value = value ? "true" : "false";
131
get => int.TryParse(
Input
.Value, CultureInfo.InvariantCulture, out var result) ? result : null;
132
set =>
Input
.Value = value?.ToString(CultureInfo.InvariantCulture) ?? string.Empty;
135
public bool InputDisabled =>
Input
.Disabled ||
Input
.Loading;
150
Input
.Value = successfulRefs.Count > 0
Aspire.Dashboard.Components.Tests (1)
Dialogs\InteractionsInputDialogTests.cs (1)
206
message => Assert.Equal($"{field.Instance.InputViewModel.
Input
.Label} is required.", message.TextContent.Trim()),