diff --git a/apps/client/src/views/cuesheet/cuesheet-table/cuesheet-table-elements/EditableCell.tsx b/apps/client/src/views/cuesheet/cuesheet-table/cuesheet-table-elements/EditableCell.tsx new file mode 100644 index 000000000..2c7541e2e --- /dev/null +++ b/apps/client/src/views/cuesheet/cuesheet-table/cuesheet-table-elements/EditableCell.tsx @@ -0,0 +1,86 @@ +import { memo, useCallback, useEffect, useRef, useState } from 'react'; + +import MultiLineCell from './MultiLineCell'; +import SingleLineCell from './SingleLineCell'; +import TextLikeInput from './TextLikeInput'; + +interface EditableCellProps { + initialValue: string; + multiline?: boolean; + fieldId?: string; + fieldLabel?: string; + handleUpdate: (newValue: string) => void; +} + +interface FocusableEditor { + focus: () => void; + select?: () => void; +} + +/** + * Lazily mounts the text editor for a cell. + * + * Mounting an ``/`