0

I'm using the react version of onsen-ui. Is there a good way to add a list into another list? I'm looking for something like jQueryMobile's collapsible/accordion lists.

Lifz
  • 690
  • 6
  • 10
  • 1
    I see you have already answered yourself [here](https://community.onsen.io/topic/599/lists-inside-other-lists). As you can see there is no problem to nest lists inside one another. As for the collapsible etc I guess it can be done with a few lines of css/js. :) – Ilia Yatchev Aug 06 '16 at 05:53
  • Yes thanks so much! I'll post the answer here for future users ;) – Lifz Aug 06 '16 at 15:29

1 Answers1

0

In case others are curious, it actually wasn't that big a deal.

The pseudo-code (notice, no tappable on the parent ListItem):

<List
  <ListItem>
    Category name
    <List className="childList"
      <ListItem tappable>Item name</ListItem>
    />
>

The CSS:

.list.childList {
    width: 100%;
    border: 0;
}

It looks like this on Android: 0_1470422427007_upload-6933bd34-2ea3-4d2c-bc29-5d6dc4dac548

It looks like this on iOS: 0_1470422598421_upload-e131afcf-50d5-4417-8421-d560a911e8ea

Lifz
  • 690
  • 6
  • 10