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`] = `
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+`;
+
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)} />
+
+
+
+
+ );
+};
+
+export default App;
diff --git a/components/select/index.en-US.md b/components/select/index.en-US.md
index 59aabe7c43..b495ff27dd 100644
--- a/components/select/index.en-US.md
+++ b/components/select/index.en-US.md
@@ -40,6 +40,7 @@ Select component to select value from options.
Big Data
Status
Placement
+Dynamic Height
4.0 Debug
\_InternalPanelDoNotUseOrYouWillBeFired
Options label Centered
diff --git a/components/select/index.zh-CN.md b/components/select/index.zh-CN.md
index 7354fb4cf3..37c12c7002 100644
--- a/components/select/index.zh-CN.md
+++ b/components/select/index.zh-CN.md
@@ -41,6 +41,7 @@ demo:
大数据
自定义状态
弹出位置
+动态高度
4.0 Debug
\_InternalPanelDoNotUseOrYouWillBeFired
选项文本居中
diff --git a/components/select/useBuiltinPlacements.tsx b/components/select/useBuiltinPlacements.tsx
index 62f56d6ec2..c6af8b576e 100644
--- a/components/select/useBuiltinPlacements.tsx
+++ b/components/select/useBuiltinPlacements.tsx
@@ -4,13 +4,16 @@ import type { PopupOverflow } from '../config-provider/context';
const getBuiltInPlacements = (popupOverflow?: PopupOverflow): Record => {
const htmlRegion: AlignType['htmlRegion'] = popupOverflow === 'scroll' ? 'scroll' : 'visible';
- const sharedConfig = {
+ const sharedConfig: AlignType = {
overflow: {
adjustX: true,
adjustY: true,
shiftY: true,
},
htmlRegion,
+ _experimental: {
+ dynamicInset: true,
+ },
};
return {