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

Commit 128f396

Browse files
committed
first steps to fix calendar order
1 parent cb5b866 commit 128f396

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"react-dom": "18.2.0",
6464
"react-csv": "2.2.2",
6565
"react-popper": "2.3.0",
66-
"@tanstack/react-table": "8.3.1",
66+
"@tanstack/react-table": "8.3.3",
6767
"@tanstack/match-sorter-utils": "8.1.1",
6868
"react-select": "5.4.0",
6969
"react-color": "2.19.3",

src/components/Table.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import {
55
getFilteredRowModel,
66
getExpandedRowModel,
77
ColumnDef,
8-
ColumnResizeMode,
98
ColumnOrderState,
109
flexRender,
1110
Table,
@@ -29,7 +28,6 @@ import {
2928
ActionTypes,
3029
DatabaseCore,
3130
DatabaseLimits,
32-
DnDConfiguration,
3331
MetadataColumns,
3432
ResizeConfiguration,
3533
} from "helpers/Constants";
@@ -54,6 +52,7 @@ const defaultColumn: Partial<ColumnDef<RowDataType>> = {
5452
maxSize: DatabaseLimits.MAX_COLUMN_HEIGHT,
5553
cell: DefaultCell,
5654
header: DefaultHeader,
55+
sortingFn: "alphanumeric",
5756
};
5857

5958
/**
@@ -179,6 +178,7 @@ export function Table(tableData: TableDataType) {
179178
columnSizing: columnSizing,
180179
sorting: sorting,
181180
},
181+
182182
onSortingChange: setSorting,
183183
onColumnSizingChange: (updater) => {
184184
let list: ColumnSizingState = null;

src/components/portals/CalendarPortal.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,17 @@ const CalendarPortal = (calendarProps: CalendarProps) => {
5656
popperContainer={CalendarContainer}
5757
onBlur={() => setShowDatePicker(false)}
5858
autoFocus
59+
placeholderText="Pick a date..."
5960
/>
6061
) : (
61-
<span className={`${c("calendar")}`} onClick={handleOnClick}>
62+
<span
63+
className={`${c("calendar")}`}
64+
onClick={handleOnClick}
65+
placeholder={"Pick a date..."}
66+
>
6267
{DateTime.isDateTime(calendarState)
6368
? (calendarState as unknown as DateTime).toFormat("yyyy-MM-dd")
64-
: "Pick a date..."}
69+
: null}
6570
</span>
6671
);
6772
};

src/components/portals/CalendarTimePortal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ const CalendarTimePortal = (calendarTimeProps: CalendarProps) => {
4141
};
4242

4343
return column.isMetadata ? (
44-
<span className="calendar-time">
44+
<span className="calendar-time" placeholder="Pick a datetime">
4545
{DateTime.isDateTime(calendarTimeState)
4646
? (calendarTimeState as DateTime).toFormat("yyyy-MM-dd h:mm a")
47-
: "Invalid metadata date!"}
47+
: null}
4848
</span>
4949
) : (
5050
<div className="calendar-time">

0 commit comments

Comments
 (0)