From adb91d3aefa2f4cdb7da342997f442bc6f48c11c Mon Sep 17 00:00:00 2001 From: siriwatknp Date: Wed, 21 Sep 2022 15:40:03 +0700 Subject: [PATCH] fix select onChange --- docs/data/joy/customization/approaches/ButtonThemes.js | 2 +- docs/data/joy/main-features/automatic-adjustment/ListThemes.js | 2 +- docs/src/modules/components/JoyUsageDemo.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/data/joy/customization/approaches/ButtonThemes.js b/docs/data/joy/customization/approaches/ButtonThemes.js index 85cf18d776c341..08ae5d7f47bb71 100644 --- a/docs/data/joy/customization/approaches/ButtonThemes.js +++ b/docs/data/joy/customization/approaches/ButtonThemes.js @@ -560,7 +560,7 @@ export default function ButtonThemes() { }} size="sm" value={design} - onChange={setDesign} + onChange={(event, newValue) => setDesign(newValue)} sx={{ minWidth: 160 }} > diff --git a/docs/data/joy/main-features/automatic-adjustment/ListThemes.js b/docs/data/joy/main-features/automatic-adjustment/ListThemes.js index 2f40c0a21a1625..81c9ece912d7e0 100644 --- a/docs/data/joy/main-features/automatic-adjustment/ListThemes.js +++ b/docs/data/joy/main-features/automatic-adjustment/ListThemes.js @@ -115,7 +115,7 @@ export default function ButtonThemes() { }, }} value={preset} - onChange={setPreset} + onChange={(event, newValue) => setPreset(newValue)} sx={{ minWidth: 160 }} > diff --git a/docs/src/modules/components/JoyUsageDemo.tsx b/docs/src/modules/components/JoyUsageDemo.tsx index e1a12d27f45f94..d325bd66b6d8a0 100644 --- a/docs/src/modules/components/JoyUsageDemo.tsx +++ b/docs/src/modules/components/JoyUsageDemo.tsx @@ -438,7 +438,7 @@ export default function JoyUsageDemo({ }, }} value={(resolvedValue || 'none') as string} - onChange={(val) => + onChange={(event, val) => setProps((latestProps) => ({ ...latestProps, [propName]: val,