import React, { useState, useMemo, useEffect, useCallback } from 'react'; import { omit } from 'lodash'; import { Button, Intent, Position, Tooltip } from '@blueprintjs/core'; import { FormattedMessage as T, useIntl } from 'react-intl'; import classNames from 'classnames'; import { CLASSES } from 'common/classes'; import { Hint, Icon } from 'components'; import DataTable from 'components/DataTable'; import { InputGroupCell, MoneyFieldCell, ItemsListCell, PercentFieldCell, DivFieldCell, } from 'components/DataTableCells'; import withItems from 'containers/Items/withItems'; import { compose, formattedAmount, orderingLinesIndexes, saveInvoke, } from 'utils'; // Actions cell renderer component. const ActionsCellRenderer = ({ row: { index }, column: { id }, cell: { value }, data, payload, }) => { if (data.length <= index + 1) { return ''; } const onRemoveRole = () => { payload.removeRow(index); }; return ( } position={Position.LEFT}> ); } export default compose( withItems(({ itemsCurrentPage }) => ({ itemsCurrentPage, })), )(ItemsEntriesTable);