#Don't Cancel Request - 2 Actions same Form

1 messages · Page 1 of 1 (latest)

sly pagoda
#

I have two actions on the same form. They all use the same form inputs so I need it to be one form. Is there a setting I can use to not have different actions cancel each other. The same action should cancel that's fine.

plush cloud
#

The default is for an action to cancel another action if from the same source. I.e. the same fetcher or the same form.

If you want, you'll need to break out components and use Fetcher in the components independently. I make my own components when I need something like this, for example an update button on a form field that just uses fetch to get data for the field, but shouldn't interrupt the normal form.

You may also have to use more JS for what you want specifically (sad I know)

#

Lastly, with the fetcher approach make sure to disable revalidation on the endpoint so you don't end up clearing your form or losing other page data / loader data