add initial table columns

This commit is contained in:
jeffvli
2025-10-03 23:08:34 -07:00
parent c27c05ac5d
commit ae8ca54a07
21 changed files with 511 additions and 28 deletions
@@ -0,0 +1,21 @@
import {
ItemTableListInnerColumn,
TableColumnContainer,
} from '/@/renderer/components/item-list/item-table-list/item-table-list-column';
import { Rating } from '/@/shared/components/rating/rating';
export const RatingColumn = (props: ItemTableListInnerColumn) => {
const row: null | number | undefined = (props.data as (any | undefined)[])[props.rowIndex]?.[
props.columns[props.columnIndex].id
];
if (typeof row === 'number' || row === null) {
return (
<TableColumnContainer {...props}>
<Rating readOnly value={row || 0} />
</TableColumnContainer>
);
}
return <TableColumnContainer {...props}>&nbsp;</TableColumnContainer>;
};