Search code examples
reactjsonsen-uionsen-ui2

How do you add a list to another list in onsen-ui?


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.


Solution

  • 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