diff --git a/lib/use-list.js b/lib/use-list.js index d1956ebc..e9b0b7dc 100644 --- a/lib/use-list.js +++ b/lib/use-list.js @@ -7,20 +7,24 @@ import { onItemChange as _onItemChange } from './utils-data'; const _getGroupRowClasses = (folded) => folded ? 'groupRow groupRow-folded' : 'groupRow', _getFoldIcon = (expanded) => (expanded ? 'expand-less' : 'expand-more'), - renderItem = ({ - columns, - collapsedColumns, - onItemClick, - onCheckboxChange, - dataIsValid, - groupOnColumn, - onItemChange, - }) => { - return (item, index, { selected, expanded, toggleCollapse }) => { - return html`
+ renderItem = + ({ + columns, + collapsedColumns, + onItemClick, + onCheckboxChange, + dataIsValid, + groupOnColumn, + onItemChange, + rowPartFn, + }) => + (item, index, { selected, expanded, toggleCollapse }) => + html`
part="item-expand" > -
`; - }; - }, +
`, renderGroup = ({ onCheckboxChange, dataIsValid, groupOnColumn }) => { return (item, index, { selected, folded, toggleFold }) => html`
{ const { loading = false, displayEmptyGroups = false, compareItemsFn } = host, @@ -193,6 +196,7 @@ export const useList = ({ dataIsValid, groupOnColumn, onItemChange, + rowPartFn, }), [ columns, @@ -202,6 +206,7 @@ export const useList = ({ dataIsValid, groupOnColumn, onItemChange, + rowPartFn, ], ), renderGroup: useMemo( diff --git a/lib/use-omnitable.js b/lib/use-omnitable.js index 9749079f..1b70d58c 100644 --- a/lib/use-omnitable.js +++ b/lib/use-omnitable.js @@ -18,7 +18,8 @@ export const useOmnitable = (host) => { noLocal, noLocalSort = noLocal, noLocalFilter = noLocal, - error + error, + rowPartFn } = host, settingS = useSettings({ settingsId, host }), { settings, setSettings, columns, resetRef } = settingS, @@ -86,6 +87,7 @@ export const useOmnitable = (host) => { columns, collapsedColumns, sortAndGroupOptions, + rowPartFn }), footer: useFooter({ host,