Skip to content

Commit 47ae74d

Browse files
committed
Merge branch 'main' into enhancement/docs-site-ts
2 parents 0d2dc05 + 1140e04 commit 47ae74d

File tree

7 files changed

+435
-62
lines changed

7 files changed

+435
-62
lines changed

docs-site/package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,17 @@
2828
"@types/lodash": "^4.17.0",
2929
"@types/react": "^19.1.12",
3030
"@types/react-dom": "^19.1.9",
31+
"@typescript-eslint/eslint-plugin": "^7.0.0",
32+
"@typescript-eslint/parser": "^7.0.0",
3133
"@vitejs/plugin-react": "^5.0.1",
32-
"eslint": "^9.34.0",
34+
"eslint": "^9.35.0",
3335
"eslint-plugin-react": "^7.37.5",
3436
"eslint-plugin-react-hooks": "^6.0.0",
3537
"eslint-plugin-react-refresh": "^0.4.20",
3638
"globals": "^16.3.0",
37-
"sass": "^1.92.0",
39+
"sass": "^1.92.1",
3840
"typescript": "^5.7.2",
39-
"vite": "^7.1.3"
41+
"vite": "^7.1.5"
4042
},
4143
"packageManager": "[email protected]"
4244
}

docs-site/src/examples/ts/rawChange.tsx

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,21 @@
1+
interface SelectedDateMeta {
2+
date: Date;
3+
formattedDate: string;
4+
}
5+
16
const RawChange = () => {
27
const [selectedDate, setSelectedDate] = useState<Date | null>(null);
38

4-
const handleChangeRaw = (value: string) => {
9+
const handleChangeRaw = (
10+
value: string,
11+
selectedDateMeta?: SelectedDateMeta | null,
12+
) => {
13+
console.log(
14+
selectedDateMeta
15+
? `Selected Date Meta: ${JSON.stringify(selectedDateMeta)}`
16+
: "No Selection Meta is available",
17+
);
18+
519
if (value === "tomorrow") {
620
setSelectedDate(DateFNS.addDays(new Date(), 1));
721
}
@@ -17,9 +31,10 @@ const RawChange = () => {
1731
| React.MouseEvent<HTMLElement>
1832
| React.KeyboardEvent<HTMLElement>
1933
| React.ChangeEvent<HTMLInputElement>,
34+
selectedDateMeta?: SelectedDateMeta | null,
2035
) => {
2136
if (event.target instanceof HTMLInputElement) {
22-
handleChangeRaw(event.target.value);
37+
handleChangeRaw(event.target.value, selectedDateMeta);
2338
}
2439
}}
2540
/>

0 commit comments

Comments
 (0)