Skip to content

Button Click Not working on the right component - How to debug? #534

Answered by egil
gismofx asked this question in Q&A
Discussion options

You must be logged in to vote

I played around with the test, and here is a few observations:

  1. Having a look at testComponent.Markup after the first render reveals that there is five <button> elements in the markup.
  2. The button you change the Disabed parameter on, buttonComponent, doesn't contain the same <button> element as the one you find when you do testComponent.Find("button"), so changing it doesn't change the button you expect. That is why the button you are trying to click is still disabled.
  3. Using testComponent.FindComponents<MudButton>(); show that there is one <MudButton> in the render tree.
  4. Using testComponent.FindAll("button") we see there are five buttons, and the two first in the DOM tree is disabled.
  5. If w…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by gismofx
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants