The expressions marked with #This doesn't work below aren’t being evaluated. It seems to be returned verbatim, as in the screenshot below. I have tried enclosing them in single quotes, double quotes, and plain. How can I fix this?
- component: oh-repeater
config:
sourceType: array
in: =JSON.parse(items[props.photos].state) # This works fine
for: photo
fragment: true
slots:
default:
- component: oh-image
config:
lazy: true
url: =loop.photo.url # This works fine
action: photos
actionPhotos:
- url: =loop.photo.url # This doesn't work
caption: =loop.photo.name # This doesn't work
actionPhotoBrowserConfig:
type: popup
toolbar: false
swipeToClose: true
exposition: false
style:
width: 190px
height: 106px
object-fit: contain
padding: 1px
Individual array elements cannot contain expressions. For that particular parameter a JSON serialization is also acceptable so here’s how I made it in one of my widgets:
hence my confusion why expressions can’t be evaluated there. Could you point me in the general location in the source code where the expression evaluation / extrapolation is being done?