mirror of
https://github.com/jeffvli/feishin.git
synced 2026-06-15 07:54:18 +02:00
progress on table columns
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import {
|
||||
ItemTableListInnerColumn,
|
||||
TableColumnContainer,
|
||||
} from '/@/renderer/components/item-list/item-table-list/item-table-list-column';
|
||||
import { Skeleton } from '/@/shared/components/skeleton/skeleton';
|
||||
|
||||
export const DefaultColumn = (props: ItemTableListInnerColumn) => {
|
||||
const row: any | undefined = (props.data as (any | undefined)[])[props.rowIndex]?.[
|
||||
props.columns[props.columnIndex].id
|
||||
];
|
||||
|
||||
if (typeof row === 'string') {
|
||||
return <TableColumnContainer {...props}>{row}</TableColumnContainer>;
|
||||
}
|
||||
|
||||
if (typeof row === 'undefined') {
|
||||
return (
|
||||
<TableColumnContainer {...props}>
|
||||
<Skeleton />
|
||||
</TableColumnContainer>
|
||||
);
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
Reference in New Issue
Block a user