@pdg/react-table 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Table/Table.types.d.ts +1 -0
- package/dist/index.esm.js +4 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -13,6 +13,7 @@ export interface TableColumn<T = TableItem> {
|
|
|
13
13
|
width?: string | number;
|
|
14
14
|
minWidth?: string | number;
|
|
15
15
|
ellipsis?: boolean;
|
|
16
|
+
dateFormat?: string;
|
|
16
17
|
tooltipProps?: Omit<TooltipProps, 'children' | 'title'>;
|
|
17
18
|
head?: {
|
|
18
19
|
className?: CommonSxProps['className'];
|
package/dist/index.esm.js
CHANGED
|
@@ -8523,13 +8523,13 @@ var TableBodyCell = function (_a) {
|
|
|
8523
8523
|
}
|
|
8524
8524
|
break;
|
|
8525
8525
|
case 'date':
|
|
8526
|
-
if (data
|
|
8527
|
-
data = dayjs(data).format('YYYY-MM-DD');
|
|
8526
|
+
if (data) {
|
|
8527
|
+
data = dayjs(data, column.dateFormat).format('YYYY-MM-DD');
|
|
8528
8528
|
}
|
|
8529
8529
|
break;
|
|
8530
8530
|
case 'datetime':
|
|
8531
|
-
if (data
|
|
8532
|
-
data = dayjs(data).format('YYYY-MM-DD HH:mm:ss');
|
|
8531
|
+
if (data) {
|
|
8532
|
+
data = dayjs(data, column.dateFormat).format('YYYY-MM-DD HH:mm:ss');
|
|
8533
8533
|
}
|
|
8534
8534
|
break;
|
|
8535
8535
|
default:
|