Open ChazUK opened 2 years ago
I can confirm also the problem. To demonstrate the problem I created a branch with 2 failing unit tests: https://github.com/adobe/aem-spa-page-model-manager/compare/master...orangeven:aem-spa-page-model-manager:boolean-value-becomes-empty-space-after-setData?expand=1
the responsible line is https://github.com/adobe/aem-spa-page-model-manager/blob/master/src/ModelStore.ts#L97
it is a side effect of changes for https://github.com/adobe/aem-angular-editable-components/issues/20
Describe the bug I've had an issue when trying to process boolean values when updating components in AEM. When switching boolean values in the dialog, trying to set it to
false
does not sendfalse
but instead sends an empty string''
. The dialog sets the values to be boolean, the sling model sets it to boolean, and the.model.json
also shows the update as a boolean, but the angular component receives the string.Update in Network bannerhero.model.json?=1645206630867
{"title":"hello world","showPattern":false,":type":"eds-aem-app/components/banner-hero"}
But the console logs
show pattern true {value: ''}
I would expect that the angular component is sent
false
instead of an empty string.I've added some code below to try and replicate, I've got no idea how to package stuff up.
Package version @adobe/aem-angular-editable-components@1.4.0 @adobe/aem-spa-component-mapping@1.1.1 @adobe/aem-spa-page-model-manager@1.4.0 @angular/*@13.2.0
To Reproduce
Dialog