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

[Custom Components] Panel ist not rendered when loaded in lazy mode #502

Closed
dmenne opened this issue Mar 24, 2020 · 6 comments
Closed

[Custom Components] Panel ist not rendered when loaded in lazy mode #502

dmenne opened this issue Mar 24, 2020 · 6 comments

Comments

@dmenne
Copy link
Contributor

dmenne commented Mar 24, 2020

As suggested by @merobal, the following issue is reposted here

merobal/angular-formio-custom-demo#3

Example by @upexcel https://github.com/upexcel/formio-question

Netlify: https://wonderful-perlman-0d1430.netlify.com/#/test

The Preview Panel doesn't render the component when using formio in a lazy loaded module.
When I add the rating field in lazy loaded formio it doesn't load.


dmenne:

In my app, the preview and the component on the form do not render.

Surprisingly, the Default Window in the editor is displayed correctly. This can also be seen in the netlify app by @upexcel

An example how to use lazy load with custom components would be welcome

@dmenne
Copy link
Contributor Author

dmenne commented Mar 25, 2020

Works for me when I keep only lazy loading and register in test component:

https://github.com/dmenne/formio-question

@quynhlx
Copy link

quynhlx commented May 17, 2020

The same issue.
In my app, there are multi lazy load modules need to use custom component.
When custom component was registered in lazy load module, it worked.
But I don't think we should register in each module. And we have to change selector name for them.

@dmenne
Copy link
Contributor Author

dmenne commented May 20, 2020

Agreed, I independently stumbled over this today:

-- To use lazy loading, I have to register custom components in the loaded submodule.
-- To use is in other parts, I have to register it in app.module, which is also what https://angular.io/guide/ngmodule-faq suggests.

Any Angular-guru around? Is there some way of saying "force-use the registration in the parent module"?

@dmenne
Copy link
Contributor Author

dmenne commented May 25, 2020

Help, I am stuck. Any ideas?

@JRiggenbach
Copy link

@dmenne Assuming you're still waiting for an answer to this?

@dmenne
Copy link
Contributor Author

dmenne commented Aug 28, 2020

No, I have totally given up using Formio. Too many rough corners. We switched to ODK Collect, which is not that flexible, but works reasonably.

@dmenne dmenne closed this as completed Aug 28, 2020
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

3 participants