Hello Anvil Community,
I am reaching out for assistance regarding a persistent issue I’ve encountered with property updates in custom components, specifically within the [Beta] Anvil designer.
Issue Overview: In my custom components, I’ve been facing challenges with property updates not being retained. This issue is not confined to a single property but affects various properties. To illustrate, I’ll reference the spacing_above
property, but it’s important to note that this is part of a broader problem.
Here’s an example setup for context:
pythonCopy code
@property
def spacing_above(self):
return self.column_panel.spacing_above
@spacing_above.setter
def spacing_above(self, value):
self.column_panel.spacing_above = value
Problematic Behavior: The expected behavior is for updates made to properties in the custom components to persist. However, I observe that when I close and then reopen the Form containing these components in the [Beta] Anvil designer, the changes are not retained.
Error Encountered in Beta Designer: Additionally, each time I open this Form in the [Beta] designer, I encounter the following error:
javascriptCopy code
[An internal error has occurred] - see browser console for more details
TypeError: Cannot read properties of null (reading 'addEventListener')
at [URL]
This issue seems specific to the [Beta] version of the Anvil designer. I’m seeking insights into why these property changes are not being preserved and how to resolve the error encountered in the designer. Any advice, shared experiences, or suggestions from the community would be immensely helpful.
Thank you for your time and assistance!