UNPKG

tdesign-react

Version:
25 lines (24 loc) 1.09 kB
import { TableRowData, PrimaryTableCol, PrimaryTableRowEditContext, PrimaryTableRowValidateContext, TdBaseTableProps } from './type'; import { TableClassName } from './hooks/useClassName'; import { AllValidateResult } from '../form/type'; export interface EditableCellProps { row: TableRowData; rowIndex: number; col: PrimaryTableCol<TableRowData>; colIndex: number; oldCell: PrimaryTableCol<TableRowData>['cell']; tableBaseClass?: TableClassName['tableBaseClass']; /** 行编辑需要使用 editable。单元格编辑则无需使用,设置为 undefined */ editable?: boolean; readonly?: boolean; errors?: AllValidateResult[]; cellEmptyContent?: TdBaseTableProps['cellEmptyContent']; onChange?: (context: PrimaryTableRowEditContext<TableRowData>) => void; onValidate?: (context: PrimaryTableRowValidateContext<TableRowData>) => void; onRuleChange?: (context: PrimaryTableRowEditContext<TableRowData>) => void; } declare const EditableCell: { (props: EditableCellProps): any; displayName: string; }; export default EditableCell;