Open simon-leech opened 2 weeks ago
This should be fairly easy to fix.
The expanded classlist is only assigned if a group does not exist. The classList should be added after if (!groups[entry.group]) {}
instead.
function entryGroup(entry) {
if (!entry.group) return;
// Create new group
if (!groups[entry.group]) {
if (entry.expanded) {
// Add to the string as this can have other classes.
entry.groupClassList += ' expanded'
}
groups[entry.group] = entry.listview.appendChild(
mapp.ui.elements.drawer({
class: `group ${entry.groupClassList && 'expanded' || ''}`,
header: mapp.utils.html`
<h3>${entry.group}</h3>
<div class="mask-icon expander"></div>`,
}))
}
// The group will replace the entry listview to which elements will be appended.
entry.listview = groups[entry.group]
}
Issue Template
Description
infoj
group
and applyinggroupClassList
this is only applied if the firstinfoj
entry contains it. Example below the group will be collapsed. Move thegroupClassList
to the"field": "a"
entry and it will be expanded.infoj
group but all the values in the group are null, an empty group is created. This shouldn't be created if no data to display as its a group of nothing in theinfoj
.Type of Issue
Please delete options that are not relevant, and select all options that apply.