import React, { useContext } from 'react'; import StandardList, { StandardListProps } from '../../components/StandardList/index'; import { InternalCurdBox } from '../CurdBox'; import DataContext from '../../DataContext'; type NoDataStandardTableProps = Omit, 'data'>; export interface CustomStandardListProps extends NoDataStandardTableProps { renderActions?: InternalCurdBox['renderActions']; handleDataChange?: InternalCurdBox['handleDataChange']; } export default function CustomStandardList(props: CustomStandardListProps) { const { handleDataChange, renderActions, ...rest } = props; const { data } = useContext(DataContext); return ( renderActions(record) : undefined} onChange={handleDataChange as any} data={data} /> ); }