import React, { useCallback } from 'react'; import { FormGroup, Intent, Classes } from '@blueprintjs/core'; import classNames from 'classnames'; import { CellType } from 'common'; import ContactsSuggestField from 'components/ContactsSuggestField'; export default function ContactsListCellRenderer({ column: { id }, row: { index, original }, cell: { value }, payload: { contacts, updateData, errors }, }) { const handleContactSelected = useCallback( (contact) => { updateData(index, 'contact_id', contact.id); }, [updateData, index, id], ); const error = errors?.[index]?.[id]; return ( ); } ContactsListCellRenderer.cellType = CellType.Field;