diff --git a/components/select/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/select/__tests__/__snapshots__/demo-extend.test.ts.snap index 222fcb78fa..786653399d 100644 --- a/components/select/__tests__/__snapshots__/demo-extend.test.ts.snap +++ b/components/select/__tests__/__snapshots__/demo-extend.test.ts.snap @@ -6656,6 +6656,297 @@ Array [ ] `; +exports[`renders components/select/demo/placement-debug.tsx extend context correctly 1`] = ` +
+
+
+
+ + + + +
+
+
+ +
+
+ +
+
+
+
+ + + + +
+
+
+
+
+ 0 +
+
+ 1 +
+
+
+
+
+
+
+
+ Option 0 +
+
+
+
+ Option 1 +
+
+
+
+ Option 2 +
+
+
+
+
+
+
+
+ +
+
+`; + exports[`renders components/select/demo/responsive.tsx extend context correctly 1`] = `
+
+
+
+ + + + +
+
+
+ +
+
+ +
+
+
+
+ + + + +
+ +
+
+`; + exports[`renders components/select/demo/responsive.tsx correctly 1`] = `
{ + const length = count ?? Math.floor(Math.random() * 5) + 1; + + // Random 1 ~ 5 options + return Array.from({ length }).map((_, index) => ({ + value: index, + label: `Option ${index}`, + })); +}; + +const App: React.FC = () => { + const [placement, SetPlacement] = useState('topLeft'); + const [open, setOpen] = useState(false); + const [options, setOptions] = useState(() => randomOptions(3)); + + const placementChange = (e: RadioChangeEvent) => { + SetPlacement(e.target.value); + }; + + return ( +
+ + + TL + TR + BL + BR + + + setOpen((o) => !o)} /> + + +