private string DS_PALAVRA_CHAVE { get; set }
<RadzenLabel Text="Palavra Chave" Component="InputPalavraChave" />
<RadzenTextBox Name="InputPalavraChave"
@bind-Value="@DS_PALAVRA_CHAVE"
class="w-100" />
Hello try this
Or
There is also a Trim option that does this by default.
<RadzenTextBox Trim="true" ... />
How does it work?
From what I tested, when I enter a value in the field the first time it works normally, however, when I enter it again it stops working.
You can check the implementation.
@zehguilherme like this should work as expected.
<RadzenTextBox Value=@value ValueChanged=@(args=> value = args.Trim())
@korchev i tested it in the demo and i i agree that work only the first time (with trim prop to true), if u insert only spaces it doesn't trim them.
To replicate:
- input a rnd value with spaces around like " test "
- Remove focus so Change get invoked and the textbox should be trimmed
- U result with "test"
- Now add only spaces around "test" like "test "
- Remove focus so Change get invoked and the textbox should be trimmed
- U result with "test " so trim didnt work as expected
Its like nothing for the cmp is changed so dosnt render the value trimmed (?).
I think its a bug, even if its strage\unusual for an end-user to insert only spaces in a second time edit