|
33 | 33 | <FluentStack Orientation="Orientation.Vertical" VerticalGap="12">
|
34 | 34 | @foreach (var vm in _inputDialogInputViewModels)
|
35 | 35 | {
|
36 |
| - @* |
37 |
| - * AutoComplete value of one-time-code on password input prevents the browser asking to save the value. |
38 |
| - * Immediate value of true on text inputs ensures the value is set to the server token with every key press in textbox. |
39 |
| - *@ |
40 | 36 | var localItem = vm;
|
41 | 37 | var descriptionId = !string.IsNullOrEmpty(localItem.Input.Description)
|
42 | 38 | ? $"{_elementRefs[localItem]?.Id}-description"
|
|
45 | 41 | @switch (vm.Input.InputType)
|
46 | 42 | {
|
47 | 43 | case InputType.Text:
|
| 44 | + @* |
| 45 | + * Immediate value of true on text input ensures the value is set to the server token with every key press in textbox. |
| 46 | + *@ |
48 | 47 | <FluentTextField @ref="@_elementRefs[localItem]"
|
49 | 48 | @bind-Value="localItem.Value"
|
50 | 49 | Label="@localItem.Input.Label"
|
51 | 50 | Placeholder="@localItem.Input.Placeholder"
|
52 | 51 | Required="localItem.Input.Required"
|
53 | 52 | Immediate="true"
|
54 | 53 | aria-describedby="@descriptionId"
|
55 |
| - Maxlength="@MaxTextLength" /> |
| 54 | + Maxlength="@GetMaxLength(localItem)" /> |
56 | 55 | @GetDescriptionContent(localItem.Input, descriptionId)
|
57 | 56 | <ValidationMessage For="@(() => localItem.Value)" />
|
58 | 57 | break;
|
59 | 58 | case InputType.SecretText:
|
| 59 | + @* |
| 60 | + * AutoComplete value of one-time-code on password input prevents the browser asking to save the value. |
| 61 | + * Immediate value of true on text input ensures the value is set to the server token with every key press in textbox. |
| 62 | + *@ |
60 | 63 | <FluentTextField @ref="@_elementRefs[localItem]"
|
61 | 64 | @bind-Value="localItem.Value"
|
62 | 65 | Label="@localItem.Input.Label"
|
|
66 | 69 | AutoComplete="one-time-code"
|
67 | 70 | Immediate="true"
|
68 | 71 | aria-describedby="@descriptionId"
|
69 |
| - Maxlength="@MaxTextLength" /> |
| 72 | + Maxlength="@GetMaxLength(localItem)" /> |
70 | 73 | @GetDescriptionContent(localItem.Input, descriptionId)
|
71 | 74 | <ValidationMessage For="@(() => localItem.Value)" />
|
72 | 75 | break;
|
|
0 commit comments