Skip to content

Draft: fix: wrap the form `.mount()` call into loading state - show spinner while...

Mazur Volodymyr requested to merge fix/wrap-Form-mount-into-loading-state into master

fix: wrap the form .mount() call into loading state - show spinner while executing async functions

There are 2 cases:

  • Form.mount is an asynchronous method that awaits the init store action inside. In the init action, we may load some data from the server for a form so we should have a spinner at this time,
  • formController.mount may be an async function that loads or initializes some stuff so we should wrap it into the spinner

It prevents empty page freeze if there are server queries inside the inited action (loading form data, beforeInit, inited hooks) or inside the form module.exports.mount- just show spinner at this time

Edited by Mazur Volodymyr

Merge request reports