diff --git a/striker-ui/components/List.tsx b/striker-ui/components/List.tsx index 084c1039..01ec1b07 100644 --- a/striker-ui/components/List.tsx +++ b/striker-ui/components/List.tsx @@ -40,6 +40,7 @@ const List = forwardRef( allowItemButton: isAllowItemButton = false, edit: isEdit = false, flexBoxProps, + getListItemCheckboxProps, header, headerSpacing = '.3em', initialCheckAll = false, @@ -184,7 +185,7 @@ const List = forwardRef( ); const listItemCheckbox = useCallback( - (key: string, checked?: boolean) => + (key: string, checked?: boolean, props?: CheckboxProps) => isEdit && isAllowCheckItem ? ( onItemCheckboxChange?.call(null, key, ...args) } + {...props} /> ) : undefined, @@ -218,6 +220,7 @@ const List = forwardRef( {listItemCheckbox( key, renderListItemCheckboxState?.call(null, key, value), + getListItemCheckboxProps?.call(null, key, value), )} {isAllowItemButton ? ( = { allowItemButton?: boolean; edit?: boolean; flexBoxProps?: import('../components/FlexBox').FlexBoxProps; + getListItemCheckboxProps?: (key: string, value: T) => CheckboxProps; header?: import('react').ReactNode; headerSpacing?: number | string; initialCheckAll?: boolean;