Skip to content

Commit

Permalink
feat: export checkboxes as parts
Browse files Browse the repository at this point in the history
So we can hide them if required.
  • Loading branch information
cristinecula committed Nov 28, 2023
1 parent 7376d56 commit 598395b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/use-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const _getGroupRowClasses = (folded) =>
<input
class="checkbox"
type="checkbox"
part="checkbox"
.checked=${selected}
.dataItem=${item}
@input=${onCheckboxChange}
Expand Down Expand Up @@ -157,7 +158,7 @@ export const useList = ({
item: e.currentTarget.dataItem,
index: e.currentTarget.dataIndex,
},
})
}),
);
}, []);

Expand All @@ -169,7 +170,7 @@ export const useList = ({
const { groupOnColumn } = sortAndGroupOptions,
onItemChange = useCallback(
(column, item) => (value) => _onItemChange(host, column, item, value),
[]
[],
);

return {
Expand Down Expand Up @@ -201,7 +202,7 @@ export const useList = ({
dataIsValid,
groupOnColumn,
onItemChange,
]
],
),
renderGroup: useMemo(
() =>
Expand All @@ -210,7 +211,7 @@ export const useList = ({
dataIsValid,
groupOnColumn,
}),
[onCheckboxChange, dataIsValid, groupOnColumn]
[onCheckboxChange, dataIsValid, groupOnColumn],
),
};
};

0 comments on commit 598395b

Please sign in to comment.