Monaca Onsen UI Discord Chat Github Repo

Lists inside other lists?

  • Is it possible to add a list to another list? What I’m looking for is something like jQueryMobile’s idea of collapsible lists. You have an overarching category and then when you click on that, it expands to show the details inside.

    I started by adding a List to a ListItem and while it didn’t error, it displayed the “inside” list next to the category title. Maybe it’s up to me to get crazy with the CSS but I’m just checking here before I venture into that mess!

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

    The pseudo-code (notice, no tappable on the parent 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:

    It looks like this on iOS: