diff --git a/components/form/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/form/__tests__/__snapshots__/demo-extend.test.ts.snap index 377859a68c..07e2d782c3 100644 --- a/components/form/__tests__/__snapshots__/demo-extend.test.ts.snap +++ b/components/form/__tests__/__snapshots__/demo-extend.test.ts.snap @@ -76,13 +76,148 @@ exports[`renders ./components/form/demo/advanced-search.md extend context correc
- +
+
+ + + + + longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong + +
+
+
+
+
+
+ 1 +
+
+ 2 +
+
+
+
+
+
+
+
+ 1 +
+
+
+
+ longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong +
+
+
+
+
+
+
+
+
+ +
@@ -193,13 +328,148 @@ exports[`renders ./components/form/demo/advanced-search.md extend context correc
- +
+
+ + + + + longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong + +
+
+
+
+
+
+ 1 +
+
+ 2 +
+
+
+
+
+
+
+
+ 1 +
+
+
+
+ longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong +
+
+
+
+
+
+
+
+
+ +
diff --git a/components/form/__tests__/__snapshots__/demo.test.js.snap b/components/form/__tests__/__snapshots__/demo.test.js.snap index 8dbd143577..07041fb0b3 100644 --- a/components/form/__tests__/__snapshots__/demo.test.js.snap +++ b/components/form/__tests__/__snapshots__/demo.test.js.snap @@ -76,13 +76,66 @@ exports[`renders ./components/form/demo/advanced-search.md correctly 1`] = `
- +
+
+ + + + + longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong + +
+ +
@@ -193,13 +246,66 @@ exports[`renders ./components/form/demo/advanced-search.md correctly 1`] = `
- +
+
+ + + + + longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong + +
+ +
diff --git a/components/form/demo/advanced-search.md b/components/form/demo/advanced-search.md index e2ee2be8cb..1792c61fd3 100644 --- a/components/form/demo/advanced-search.md +++ b/components/form/demo/advanced-search.md @@ -21,9 +21,11 @@ Because the width of label is not fixed, you may need to adjust it by customizin ```tsx import React, { useState } from 'react'; -import { Form, Row, Col, Input, Button } from 'antd'; +import { Form, Row, Col, Input, Button, Select } from 'antd'; import { DownOutlined, UpOutlined } from '@ant-design/icons'; +const { Option } = Select; + const AdvancedSearchForm = () => { const [expand, setExpand] = useState(false); const [form] = Form.useForm(); @@ -44,7 +46,16 @@ const AdvancedSearchForm = () => { }, ]} > - + {i % 3 !== 1 ? ( + + ) : ( + + )} , ); diff --git a/components/form/style/horizontal.less b/components/form/style/horizontal.less index f8238982ae..a879c4bd71 100644 --- a/components/form/style/horizontal.less +++ b/components/form/style/horizontal.less @@ -9,10 +9,12 @@ } .@{form-item-prefix-cls}-control { flex: 1 1 0; - } - // https://github.com/ant-design/ant-design/issues/32980 - .@{form-item-prefix-cls}-control:not(.@{ant-prefix}-col) { // https://github.com/ant-design/ant-design/issues/32777 + // https://github.com/ant-design/ant-design/issues/33773 min-width: 0; } + // https://github.com/ant-design/ant-design/issues/32980 + .@{form-item-prefix-cls}-label.@{ant-prefix}-col-24 + .@{form-item-prefix-cls}-control { + min-width: unset; + } }