Open kuebelkasten opened 2 years ago
use the TextChanged event and if ok StaetHasChanged();
use the TextChanged event and if ok StaetHasChanged();
Could you provide an example please?
Because I tried with this demonstration and seems that your solution does not work, you can see in the background that _disabled
is changing but it's not affecting the MudButton
at all!
Just to provide some context, I changed the MudMessageBox
component to show the expected behavior.
Have you tried Immediate="true"
on your MudTextField
?
@americanslon Yes. As can be seen in the issue's snippet 😉 I just omitted the ="true"
part as boolean parameters will be set to true
when not specified explicitly.
Still I have no idea what is causing this behavior. Ergo, I have no idea how this could be fixed.
At least it seems not to be a problem with the <MudButton>
. If I add the _disabled
property to the YesButton
-fragment of @drocha87's example it will show false
when typing or tabbing and only true
when clicking outside the MudTextField
Bug type
Component
Component name
MudMessageBox
What happened?
I wanted to add a simple captcha-functionality by letting the user type in a random string into a text-field before he is able to click the
Yes
button. However, when typing in 'test' the button seems not to update from disabled to enabled. Even tabing out of the text-field does not trigger a re-render of the button. Only when clicking outside the text-field the button is re-rendered.Expected behavior
As soon as the user typed
test
into the text-field, theYes
button should be enabled. When typed something other it should be disabled againReproduction link
https://try.mudblazor.com/snippet/wamGYqmvxajRVtHM
Reproduction steps
Relevant log output
No response
Version (bug)
6.0.10
Version (working)
No response
What browsers are you seeing the problem on?
Firefox, Chrome, Microsoft Edge
On what operating system are you experiencing the issue?
Windows, iOS
Pull Request
Code of Conduct