(
props: CellProps & {readonly className?: string; readonly showType?: boolean},
)
| 9 | import {EDITABLE} from './common/index.tsx'; |
| 10 | |
| 11 | export const EditableCellView: typeof EditableCellViewDecl = ( |
| 12 | props: CellProps & {readonly className?: string; readonly showType?: boolean}, |
| 13 | ): JSXElement => { |
| 14 | const [cell, setCell] = useCellState( |
| 15 | () => props.tableId, |
| 16 | () => props.rowId, |
| 17 | () => props.cellId, |
| 18 | () => props.store, |
| 19 | ); |
| 20 | const store = useStoreOrStoreById(() => props.store); |
| 21 | return EditableThing({ |
| 22 | get thing() { |
| 23 | return cell(); |
| 24 | }, |
| 25 | onThingChange: setCell, |
| 26 | class: props.className ?? EDITABLE + CELL, |
| 27 | showType: props.showType, |
| 28 | hasSchema: () => !!store()?.hasTablesSchema(), |
| 29 | }); |
| 30 | }; |
nothing calls this directly
no test coverage detected
searching dependent graphs…