You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Editing instance settings while it's being created #1613
Ugly. Instance create is synchronous, so we're waiting for the request to come back. So I think for now we have to just disable the form fields. Once we have async operations per RFD 402, we will get the initial response back much more quickly and can land on instances list or instance detail while it's creating.
Only block navigating away if the form is not submitting. This seems to work on the mock API: const blocker = useBlocker(isDirty && isSubmitting). Easy fix, users can still edit the field...maybe fine?
Disable key and pointer events on the form whilst it's submitting. Perhaps weird for the user not to be able to select their inputs whilst submitting?
I'm going to start in on this, approaching it as Ben laid out in option #3 above. There are a few UI elements that aren't, strictly speaking, form elements, (tabs, buttons), but they impact the form state, so I'll freeze those as well when isSubmitting.
Activity
david-crespo commentedon Jun 29, 2023
Ugly. Instance create is synchronous, so we're waiting for the request to come back. So I think for now we have to just disable the form fields. Once we have async operations per RFD 402, we will get the initial response back much more quickly and can land on instances list or instance detail while it's creating.
benjaminleonard commentedon Jan 17, 2024
A few options for fixing this:
Only block navigating away if the form is not submitting. This seems to work on the mock API:
const blocker = useBlocker(isDirty && isSubmitting). Easy fix, users can still edit the field...maybe fine?Disable key and pointer events on the form whilst it's submitting. Perhaps weird for the user not to be able to select their inputs whilst submitting?
Extend the controller component (https://react-hook-form.com/advanced-usage#TransformandParse) subscribe to formState.isSubmitting and disable the inputs when a form is submitting. Perhaps the most robust and would fix this issue elsewhere, requires updates to every field component.
charliepark commentedon Jan 17, 2024
I'm going to start in on this, approaching it as Ben laid out in option #3 above. There are a few UI elements that aren't, strictly speaking, form elements, (tabs, buttons), but they impact the form state, so I'll freeze those as well when
isSubmitting.