mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 13:50:31 +00:00
refactoring: migrating to react-query to manage service-side state.
This commit is contained in:
@@ -11,13 +11,7 @@ import {
|
||||
PercentFieldCell,
|
||||
DivFieldCell,
|
||||
} from 'components/DataTableCells';
|
||||
|
||||
import withItems from 'containers/Items/withItems';
|
||||
import {
|
||||
compose,
|
||||
formattedAmount,
|
||||
saveInvoke,
|
||||
} from 'utils';
|
||||
import { formattedAmount, saveInvoke } from 'utils';
|
||||
|
||||
// Actions cell renderer component.
|
||||
const ActionsCellRenderer = ({
|
||||
@@ -77,11 +71,9 @@ const ItemHeaderCell = () => (
|
||||
</>
|
||||
);
|
||||
|
||||
function ItemsEntriesTable({
|
||||
//#withitems
|
||||
itemsCurrentPage,
|
||||
|
||||
export default function ItemsEntriesTable({
|
||||
//#ownProps
|
||||
items,
|
||||
entries,
|
||||
errors,
|
||||
onUpdateData,
|
||||
@@ -229,7 +221,7 @@ function ItemsEntriesTable({
|
||||
rowClassNames={rowClassNames}
|
||||
sticky={true}
|
||||
payload={{
|
||||
items: itemsCurrentPage,
|
||||
items,
|
||||
errors: errors || [],
|
||||
updateData: handleUpdateData,
|
||||
removeRow: handleRemoveRow,
|
||||
@@ -257,9 +249,3 @@ function ItemsEntriesTable({
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export default compose(
|
||||
withItems(({ itemsCurrentPage }) => ({
|
||||
itemsCurrentPage,
|
||||
})),
|
||||
)(ItemsEntriesTable);
|
||||
|
||||
Reference in New Issue
Block a user