fix(Table): expandFixed prop type definition (#5539),close #5535

This commit is contained in:
bqy_fe 2022-04-23 09:44:15 +08:00 committed by GitHub
parent ab90e3fa08
commit 04f3e0da21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -126,7 +126,10 @@ export const tableProps = () => {
default: undefined,
},
direction: { type: String as PropType<TableProps['direction']>, default: undefined },
expandFixed: { type: Boolean as PropType<TableProps['expandFixed']>, default: undefined },
expandFixed: {
type: [Boolean, String] as PropType<TableProps['expandFixed']>,
default: undefined,
},
expandColumnWidth: {
type: Number as PropType<TableProps['expandColumnWidth']>,
default: undefined,

View File

@ -98,7 +98,7 @@ export interface TableProps<RecordType = DefaultRecordType> {
direction?: 'ltr' | 'rtl';
// Expandable
expandFixed?: boolean;
expandFixed?: 'left' | 'right' | boolean;
expandColumnWidth?: number;
expandedRowKeys?: Key[];
defaultExpandedRowKeys?: Key[];