Upgraded to openHAB 3.2.0, playing around with the pages…
I have a added a List Card. In that List Card I add a bunch of List Items (slider, stepper, toggle). Everything works fine, until I make the list “simple” (simpleList: true). The slider stops working, stepper and toggle work fine.
I tried specifying min, max, step explicitly - no difference.
Am I doing something wrong?
- component: oh-list-card
- component: oh-slider-item
- component: oh-stepper-item
- component: oh-toggle-item
There’s really no point to setting the simple list parameter. All it does, I think, is restrict what the list will render (as you’ve discovered). Just leave it out. The same goes for the mediaList setting here, I don’t think that’s doing you any good. Both of those just come down from the
f7-list that the
oh-list is based on; they’re not there because they are expected to be useful.
The only one of those list properties you may end up needing at some point is probably the
accordionList but that’s only if you want to have elements in the list expand to show additional components.
Well, it compacts the list item so that the label, value and control is on the same line. Which is what I want and supposedly what the function should do?
simpleList just adds the simple-list class to the list which is intended to be used in situations where advanced rendering is not required and therefore doesn’t render more complex elements very well. It is not intended to control whether things are on a line or not.
From the OH dacs:
simpleList Simple List
Use for simple lists
From the f7 docs:
In case we need list with simple items structure that have only titles, we may use Simple List modification. In this case we need additional class
simple-list on list block with plain
<li> items layout:
If the layout of the oh-slider-item widget doesn’t fit exactly the style you’re looking for, the best solution is not to try and change it at the list level, but to create your own custom item widget where you very easily could make sure that the slider is in line with the label and after text (although that gives you very reduced room for the slider, which I suspect was the reasoning behind the format choice in the first place). There are good getting start docs on basic custom widgets here and a very clear How To specifically for default list items here.
That way you can start with a basic list item and add an
oh-slider exactly how you want it.