Skip to content

fix: Allow onLayoutBuiltBefore to return a custom template, wrap <li> inside other <ul> or <div> #389

@martijn1k

Description

@martijn1k

Hey man, first of all... AWESOME plugin. It's really well written and documented.

However... I've been staring at the documentation for two days now, and I've been searching inside Github for a solution, but I cannot find it.

Is there a way to end up with:

<div class="typeahead__result">
      <div class="typeahead__list">
            <div class="row group">
                 <div class="col-md-3 typeahead__group">Group Name</div>
                 <div class="col-md-9 typeahead__items">
                        <ul>
                              <li class="typeahead__item">Item Stuff</li>
                        </ul>
                  </div>
            </div>
      </div>
</div>

I tried several things using template and groupTemplate but I always end up with 1 UL which holds the group names AND items for all groups, so there is no way to distinguish between different groups.

What I'm trying to achieve is a 2 column layout, column 1 holds nothing but the group name, column 2 holds the corresponding items so I can display them next to eachother when there is enough screen real estate.

Maybe I'm overthinking or missing something.
Hope you can give me some advice.

Thanks in advance.
And once again, great work!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions