the problem was with the following code:
[`onDelete${toCapital(dataSourceName)}`]: onDelete,
[`onPut${toCapital(dataSourceName)}`]: onPut,
[`onPost${toCapital(dataSourceName)}`]: onPost,
which causes the loss of the signature, so sending back the props as it is and changing that part of the code as follows:
const dataSourceProps = {
dataSource,
isLoading,
onDelete,
onPut,
onPost,
};
return { ...dataSourceProps };