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
flat-fuchsia•14mo ago
no
secure-lavenderOP•14mo 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
xenial-black•14mo ago
Does your button have
type="button" on it? Pretty sure any button inside a form will default to type="submit"secure-lavenderOP•14mo ago
I found the problem. It was caused by setting the disabled attribute of the button.