Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MudTextField error state is wrongly set #8936

Open
1 of 2 tasks
kolemasov opened this issue May 10, 2024 · 1 comment
Open
1 of 2 tasks

MudTextField error state is wrongly set #8936

kolemasov opened this issue May 10, 2024 · 1 comment

Comments

@kolemasov
Copy link

Bug type

Component

Component name

MudTextField

What happened?

Hello,

It looks like something is wrong with error state initialzation of MudTextField component. MudTextField with valid data goes into an error state after components re-render. Please see the animation below:

MudFieldBug

Expected behavior

MudTextField should retain correct state regardless of changes in the page.

Reproduction link

https://try.mudblazor.com/snippet/QOcoEpPuQPhyfoKh

Reproduction steps

  1. Run code - two required fields rendered.
  2. Clear value of the field "one".
  3. Field "one" goes in to the error state.
  4. Delete field "one" by clicking delete button next to it.
  5. Now only field "two" is shown, it is the same error state that field "one" had. Though the value is present.

Relevant log output

No response

Version (bug)

6.19.1

Version (working)

No response

What browsers are you seeing the problem on?

Chrome, Edge

On which operating systems are you experiencing the issue?

Windows

Pull Request

  • I would like to do a Pull Request

Code of Conduct

  • I agree to follow this project's Code of Conduct
@kolemasov kolemasov changed the title MudTextField error state is not reset on parameters set MudTextField error state is wrongly set May 10, 2024
@kolemasov
Copy link
Author

My guess is that Blazor recycles the deleted component and uses it again. As far as I can see MudFormComponent doesn't update error state on parameters set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant