fix bugs in items form.

This commit is contained in:
Ahmed Bouhuolia
2020-04-15 01:29:46 +02:00
parent 26faaddfed
commit cac6620ffe
20 changed files with 378 additions and 129 deletions

View File

@@ -52,7 +52,7 @@ function AccountsDataTable({
openDialog('account-form', { action: 'edit', id: account.id });
}, [openDialog]);
const actionMenuList = account => (
const actionMenuList = useCallback(account => (
<Menu>
<MenuItem text='View Details' />
<MenuDivider />
@@ -66,7 +66,8 @@ function AccountsDataTable({
text='Delete Account'
onClick={() => onDeleteAccount(account)} />
</Menu>
);
), [handleEditAccount, onDeleteAccount, onInactiveAccount]);
const columns = useMemo(() => [
{
id: 'name',
@@ -139,7 +140,7 @@ function AccountsDataTable({
className: 'actions',
width: 50,
}
], []);
], [actionMenuList]);
const selectionColumn = useMemo(() => ({
minWidth: 42,