This commit is contained in:
a.bouhuolia
2021-09-08 16:32:59 +02:00
49 changed files with 305 additions and 216 deletions

View File

@@ -79,6 +79,11 @@ function ExpensesDataTable({
});
};
// Handle cell click.
const handleCellClick = (cell, event) => {
openDrawer('expense-drawer', { expenseId: cell.row.original.id });
};
// Display empty status instead of the table.
if (isEmptyStatus) {
return <ExpensesEmptyStatus />;
@@ -105,6 +110,7 @@ function ExpensesDataTable({
TableLoadingRenderer={TableSkeletonRows}
TableHeaderSkeletonRenderer={TableSkeletonHeader}
ContextMenu={ActionsMenu}
onCellClick={handleCellClick}
payload={{
onPublish: handlePublishExpense,
onDelete: handleDeleteExpense,