You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello. I am currently facing an issue with the aem-component directive, not updating the component data correctly, when properties of the component got removed while authoring the page.
Steps to reproduce:
Use Simple component (e.g. Text Component from WKND SPA Angular Tutorial)
On AEM Author, add component, open dialog and add some text
Close the dialog while saving the data -> the component will correctly update it's data
Open Dialog again and remove the text again and save the dialog
Current behaviour:
The component will render the placeholder (because the component is considered as empty), but the text is still visible in the background.
Expected behaviour:
The component will render the placeholder (because the component is considered as empty), but also the correct component state is passed to the instance of the mapped angular component.
Hints:
This is due to the fact, that the aem-component directive is using the cqItem property to update the component data, and uses the properties of the cqItem object to update the components state. If a property is missing (because it was removed by the author), it's value will not be updated in the instantiated component.
Proposal to resolve the issue:
When the directive receives a new state using ngOnChanges, the directive should find the changes compared to the previous value, and update all changed values accordingly.
The text was updated successfully, but these errors were encountered:
This is a common problem on both angular and react components as data received from modelManager does not contain the removed properties hence they are not updated.
It should be fixed by adobe/aem-spa-page-model-manager#32
Hello. I am currently facing an issue with the aem-component directive, not updating the component data correctly, when properties of the component got removed while authoring the page.
Steps to reproduce:
Current behaviour:
The component will render the placeholder (because the component is considered as empty), but the text is still visible in the background.
Expected behaviour:
The component will render the placeholder (because the component is considered as empty), but also the correct component state is passed to the instance of the mapped angular component.
Hints:
This is due to the fact, that the aem-component directive is using the cqItem property to update the component data, and uses the properties of the cqItem object to update the components state. If a property is missing (because it was removed by the author), it's value will not be updated in the instantiated component.
Proposal to resolve the issue:
When the directive receives a new state using ngOnChanges, the directive should find the changes compared to the previous value, and update all changed values accordingly.
The text was updated successfully, but these errors were encountered: