1 write to Input
Aspire.Dashboard (1)
Model\Interaction\InputViewModel.cs (1)
43
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)
38
if (
Input
is not null && !ShouldUseIncomingValue(
Input
, input))
40
input.Value =
Input
.Value;
87
public string InputKey => $"{
Input
.Name}_{ChoiceVersion}";
112
get =>
Input
.Value;
113
set =>
Input
.Value = value ?? string.Empty;
119
get => bool.TryParse(
Input
.Value, out var result) && result;
120
set =>
Input
.Value = value ? "true" : "false";
126
get => int.TryParse(
Input
.Value, CultureInfo.InvariantCulture, out var result) ? result : null;
127
set =>
Input
.Value = value?.ToString(CultureInfo.InvariantCulture) ?? string.Empty;
130
public bool InputDisabled =>
Input
.Disabled ||
Input
.Loading;
145
Input
.Value = successfulRefs.Count > 0
Aspire.Dashboard.Components.Tests (1)
Dialogs\InteractionsInputDialogTests.cs (1)
201
message => Assert.Equal($"{field.Instance.InputViewModel.
Input
.Label} is required.", message.TextContent.Trim()),