diff --git a/lib/use-list.js b/lib/use-list.js index 361478c4..ce7e08dc 100644 --- a/lib/use-list.js +++ b/lib/use-list.js @@ -20,23 +20,28 @@ const arrow = html` const _getGroupRowClasses = (folded) => folded ? 'groupRow groupRow-folded' : 'groupRow'; -const renderMinis = (item) => (columns) => - when( - columns?.length > 0, - () => html` -
- ${columns.map( - (column) => - html`
- ${(column.renderMini ?? column.renderCell)(column, { item })} -
`, - )} -
- `, - ); +const renderMinis = + ({ item, index }) => + (columns) => + when( + columns?.length > 0, + () => html` +
+ ${columns.map( + (column) => + html`
+ ${(column.renderMini ?? column.renderCell)(column, { + item, + index, + })} +
`, + )} +
+ `, + ); const renderItem = ({ @@ -94,7 +99,7 @@ const renderItem = ${arrow} - ${renderMinis(item)(miniColumns)} + ${renderMinis({ item, index })(miniColumns)}