Closed alvor-sergio closed 1 month ago
Hey. It's kinda hard to follow the code like this. Are you able to give me a repo with a simple demo or a stackblitz?
Right, sorry. Here it is https://github.com/byteslash/ui-thing-error.git
So I made some changes to the update branch and did a PR. https://github.com/byteslash/ui-thing-error/pull/1 What I did was to remove the alert dialog from the look inside the table, set the item being edited when the user clicks the button in the table, show the dialog and then perform the action on the user record that was set to be edited.
Let me know if this is clear please.
this solves the issue. I have suspicion that this situation will also happen with other tables and dialogs though.
I wanted to add a confirmation dialog inside a table. My use case is asking for user validation before executing an action (remove the user in my case). I noticed that the reference that gets passed to the button inside the dialog is always the last item in whatever item list the table uses.
whatever you click, the id is always the last item in the data array. Replacing the dialog with a button works nicely.