Skip to content

Conversation

@Aditya9985
Copy link

When using a recent version of this library and @formio/js, two loading spinners were displayed for a single form. This was caused by both libraries showing their loading indicators simultaneously.

This PR fixes the issue by:

  1. Adding a default template configuration that sets a single loading indicator
  2. Initializing the template on library import to ensure it's set before Form components render

The solution:

  • Created a new templates.ts file that sets up the default template configuration
  • The template is initialized when the library is imported, ensuring consistent loading indicator behavior
  • Uses bootstrap3 framework for compatibility

To test:

  1. Import the Form component from @formio/react
  2. Create a form with a remote source like: <Form src="https://examples.form.io/example" />
  3. Observe that only one loading spinner appears while the form loads

Fixes #590

When using a recent version of this library and @formio/js, two loading spinners
were displayed for a single form. This was caused by both libraries showing
their loading indicators simultaneously.

The fix:
1. Added a default template configuration that sets a single loading indicator
2. Initialize the template on library import to ensure it's set before Forms render

Fixes formio#590
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Two loading spinners are displayed

2 participants