Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide the loading wheels when the editor is renderer. #497

Open
jma opened this issue May 11, 2022 · 0 comments
Open

Hide the loading wheels when the editor is renderer. #497

jma opened this issue May 11, 2022 · 0 comments

Comments

@jma
Copy link
Contributor

jma commented May 11, 2022

Describe the issue
The loading wheels should disappears when the editor is finished to render.

here is a suggestion of implementation from the ngx-formly author:

FormlyModule.forRoot({
  extensions: [
    { name: 'custom-extension', extension: { prePopulate: customExtension } },
  ],
}),

export function customExtension(field: FormlyFieldConfig) {
  field.templateOptions = field.templateOptions || {};
  if (field.parent || field.templateOptions.initialized) {
    return;
  }

  field.templateOptions.initialized = true;
  field.fieldGroup.push({
    hooks: {
      afterViewInit: () => {
        console.warn('FORM LOADED');
      }
    }
  });
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant