Thanks to Stu over on Any progress on Form type property of custom components? , the IDE preview is now working.
In the EfficientRepeatingPanel.setup_template
method, note there are two ways to get the preview working. One is not officially stable yet, while the other is. The not officially stable approach is the one that allows you to use the custom component as a dependency. Right now the stable option is uncommented, which means that to use the component you’d need to copy it and the ERPList code to your app.
If you’re using the component just to experiment, or in an app that isn’t ready for production, comment out the stable part and uncomment the get_form_constructor
line. Then you’re safe to have the custom component in a dependency.
Edit: apparently the __import__
method is pretty fragile. It works in some apps and not others (possibly due to the age of the app?). get_form_constructor
works in all cases.