import { memo, useCallback, useRef } from 'react'; import { AutoTextArea } from '../../../common/components/input/auto-text-area/AutoTextArea'; import useReactiveTextInput from '../../../common/components/input/text-input/useReactiveTextInput'; interface MultiLineCellProps { initialValue: string; handleUpdate: (newValue: string) => void; } const MultiLineCell = (props: MultiLineCellProps) => { const { initialValue, handleUpdate } = props; const ref = useRef(null); const submitCallback = useCallback((newValue: string) => handleUpdate(newValue), [handleUpdate]); const { value, onChange, onBlur, onKeyDown } = useReactiveTextInput(initialValue, submitCallback, ref, { submitOnCtrlEnter: true, }); return ( ); }; export default memo(MultiLineCell);