diff --git a/README.md b/README.md index 47c0c99..923f7ab 100644 --- a/README.md +++ b/README.md @@ -318,6 +318,8 @@ type SearchInfo = { ### `listSelectionBtnText?: string` +### `actionColumnText?: string` + ### `onError? (err): void` Error handler that trigger when onSearch throw error. diff --git a/src/index.tsx b/src/index.tsx index a4a1bbb..431cb85 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -99,6 +99,7 @@ export interface IDataTableProps { searchBtnText?: string, clearBtnText?: string, listSelectionBtnText?: string, + actionColumnText: string, /** 最大的表单项显示数,当表单项超过此数值时,会自动出现 collapse 按钮 */ maxVisibleFieldCount?: number, pageSize?: number, @@ -182,7 +183,7 @@ export class DataTable extends React.Component listSelectionBtnText: 'List selection' } - readonly actionsColumn = this.props.rowActions && { key: 'actions', title: 'Actions', render: (record) => { return renderActions(this.props.rowActions as RowAction[], record) } } as ColumnProps + readonly actionsColumn = this.props.rowActions && { key: 'actions', title: this.props.actionColumnText || 'Actions', render: (record) => { return renderActions(this.props.rowActions as RowAction[], record) } } as ColumnProps readonly shouldShowTableTitle = this.props.title || this.props.enableListSelection