1 write to Input
Aspire.Dashboard (1)
Model\Interaction\InputViewModel.cs (1)
43Input = input;
25 references to Input
Aspire.Dashboard (24)
Components\Dialogs\InteractionsInputDialog.razor.cs (11)
134_validationMessages.Add(field, $"{inputModel.Input.Label} is required."); 155if (inputModel.Input.UpdateStateOnChange) 170var fieldName = inputModel.Input.InputType switch 181return inputModel.Input.Required && 182inputModel.Input.InputType != InputType.Boolean && 235inputModel.Input.MaxFileSize > 0 ? inputModel.Input.MaxFileSize : InputViewModel.DefaultMaxUploadedFileBytes; 239if (!string.IsNullOrEmpty(inputModel.Input.Placeholder)) 241return inputModel.Input.Placeholder; 244return inputModel.Input.AllowMultipleFiles 265var fileId = await Content.DashboardClient.UploadFileAsync(stream, file.Name, file.Size, Content.Interaction.InteractionId, inputModel.Input.Name, _disposalCts.Token);
Model\Interaction\InputViewModel.cs (13)
38if (Input is not null && !ShouldUseIncomingValue(Input, input)) 40input.Value = Input.Value; 87public string InputKey => $"{Input.Name}_{ChoiceVersion}"; 112get => Input.Value; 113set => Input.Value = value ?? string.Empty; 119get => bool.TryParse(Input.Value, out var result) && result; 120set => Input.Value = value ? "true" : "false"; 126get => int.TryParse(Input.Value, CultureInfo.InvariantCulture, out var result) ? result : null; 127set => Input.Value = value?.ToString(CultureInfo.InvariantCulture) ?? string.Empty; 130public bool InputDisabled => Input.Disabled || Input.Loading; 145Input.Value = successfulRefs.Count > 0
Aspire.Dashboard.Components.Tests (1)
Dialogs\InteractionsInputDialogTests.cs (1)
245message => Assert.Equal($"{field.Instance.InputViewModel.Input.Label} is required.", message.TextContent.Trim()),