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