Hi guys,
trying to play around with the UI and found following situation:
- component: oh-repeater
config:
sourceType: range
for: room
rangeStart: 1
rangeStop: 7
fragment: true
slots:
default:
If I now use some component (ex. list-item) and assign as text/display value
title: "= loop.room"
For loop.room === 0 i just get a blank field for 1 onward normal behaviour
But if i use something like
title: “=(loop.room === 0) ? ‘0’ : loop.room”
So it has the right values for sure but it does not display them.
My problem is now that if i use JSON.parse('someitem')[loop.room]
i get only values for ‘1’ and onward not for ‘0’
Any suggestions?
Tried JSON.parse('someitem')[((loop.room === 0) ? '0' : loop.room)]
but same as without ‘if loop’. It would work if I start the range from 1 but then I have to rewrite a whole bunch of stuff) - And just to clarify: The JSON String to read from is correct (works in OH2/3 with habpanel)