Will calling mutate trigger Window Focus?
I put a Button in a Popover component. The click event is to call the mutate method of useMutation. After clicking and requesting, the Popover automatically closes.
4 Replies
extended-salmon•11mo ago
no
sunny-greenOP•11mo ago
I excluded a lot of code that was calling the mutate method and then my popover closed, even though I didn't make any data changes, just a request
rare-sapphire•11mo ago
Does your button have
type="button"
on it? Pretty sure any button inside a form will default to type="submit"
sunny-greenOP•11mo ago
I found the problem. It was caused by setting the disabled attribute of the button.