Skip to content
This repository was archived by the owner on Jul 28, 2025. It is now read-only.

Commit 0c18caa

Browse files
committed
metadata time format
1 parent eb060e8 commit 0c18caa

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/components/Cell.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ export default function DefaultCell(cellProperties: Cell) {
7676
};
7777

7878
const handlerEditableOnBlur = (event: any) => {
79-
setDirtyCell(false);
8079
setContextValue((event) => ({ value: event.value, update: true }));
80+
setDirtyCell(false);
8181
};
8282

8383
// onChange handler
@@ -108,16 +108,13 @@ export default function DefaultCell(cellProperties: Cell) {
108108
row: cellProperties.row,
109109
columnId: (cellProperties.column as any).id,
110110
});
111-
setDirtyCell(false);
112111
}
113112

114113
function getCellElement() {
115114
switch (dataType) {
116115
/** Plain text option */
117116
case DataTypes.TEXT:
118-
return (cellProperties.column as any).isMetadata ? (
119-
<span className="data-input">{contextValue.value.toString()}</span>
120-
) : dirtyCell ? (
117+
return dirtyCell ? (
121118
<input
122119
value={(contextValue.value && contextValue.value.toString()) || ""}
123120
onChange={handleOnChange}

src/components/portals/CalendarTimePortal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const CalendarTimePortal = (calendarProps: CalendarProps) => {
5050

5151
return column.isMetadata ? (
5252
<span className="data-input calendar-time">
53-
{contextValue.value.toString()}
53+
{(contextValue.value as DateTime).toFormat("yyyy-MM-dd h:mm a")}
5454
</span>
5555
) : (
5656
<div className="data-input calendar-time">

0 commit comments

Comments
 (0)