mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
BiG-5: Complete, add switch small and medium table row size.
This commit is contained in:
@@ -72,7 +72,7 @@ function ReceiptActionsBar({
|
||||
|
||||
// Handle table row size change.
|
||||
const handleTableRowSizeChange = (size) => {
|
||||
addSetting('receipt', 'tableSize', size);
|
||||
addSetting('salesReceipts', 'tableSize', size);
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
@@ -14,6 +14,7 @@ import withDrawerActions from 'containers/Drawer/withDrawerActions';
|
||||
import withDialogActions from 'containers/Dialog/withDialogActions';
|
||||
import withReceipts from './withReceipts';
|
||||
import withReceiptsActions from './withReceiptsActions';
|
||||
import withSettings from '../../../Settings/withSettings';
|
||||
|
||||
import { useReceiptsListContext } from './ReceiptsListProvider';
|
||||
import { useReceiptsTableColumns, ActionsMenu } from './components';
|
||||
@@ -37,6 +38,9 @@ function ReceiptsDataTable({
|
||||
|
||||
// #withDialogAction
|
||||
openDialog,
|
||||
|
||||
// #withSettings
|
||||
receiptsTableSize,
|
||||
}) {
|
||||
const history = useHistory();
|
||||
|
||||
@@ -125,6 +129,7 @@ function ReceiptsDataTable({
|
||||
onCellClick={handleCellClick}
|
||||
initialColumnsWidths={initialColumnsWidths}
|
||||
onColumnResizing={handleColumnResizing}
|
||||
size={receiptsTableSize}
|
||||
payload={{
|
||||
onEdit: handleEditReceipt,
|
||||
onDelete: handleDeleteReceipt,
|
||||
@@ -145,4 +150,7 @@ export default compose(
|
||||
withReceipts(({ receiptTableState }) => ({
|
||||
receiptTableState,
|
||||
})),
|
||||
withSettings(({ receiptSettings }) => ({
|
||||
receiptsTableSize: receiptSettings?.tableSize,
|
||||
})),
|
||||
)(ReceiptsDataTable);
|
||||
|
||||
Reference in New Issue
Block a user