diff --git a/.github/workflows/auto-close.yml b/.github/workflows/auto-close.yml
new file mode 100644
index 0000000000..a662b55700
--- /dev/null
+++ b/.github/workflows/auto-close.yml
@@ -0,0 +1,16 @@
+name: 🧐 Auto Closer
+
+on:
+ issues:
+ types: [labeled]
+
+jobs:
+ close-by-label:
+ runs-on: ubuntu-latest
+ if: github.event.label.name == '3.x'
+ steps:
+ - name: Comment on issue
+ uses: peter-evans/close-issue@v1
+ with:
+ comment: "Hi @${{ github.event.issue.user.login }}, Current branch is off the maintenance period. We may not accept pull request or fix bug with it anymore. This topic will be auto closed. 你好 @${{ github.event.issue.user.login }}, 当前分支已经过了维护期。我们不会再接受对其的相关 PR 与 issue。当前 topic 会被自动关闭。"
+
\ No newline at end of file
diff --git a/components/divider/__tests__/__snapshots__/demo.test.js.snap b/components/divider/__tests__/__snapshots__/demo.test.js.snap
index e7c6fcdee3..5b29daea4d 100644
--- a/components/divider/__tests__/__snapshots__/demo.test.js.snap
+++ b/components/divider/__tests__/__snapshots__/demo.test.js.snap
@@ -12,6 +12,17 @@ Array [
role="separator"
style="border-color:#7cb305"
/>,
+
+
+ Text
+
+
,
+
+ Text
+
>,
diff --git a/components/divider/style/index.less b/components/divider/style/index.less
index 46ca3ad078..68018b5307 100644
--- a/components/divider/style/index.less
+++ b/components/divider/style/index.less
@@ -35,13 +35,18 @@
font-size: @font-size-lg;
white-space: nowrap;
text-align: center;
+ border-color: @divider-color;
border-top: 0;
+
&::before,
&::after {
position: relative;
top: 50%;
width: 50%;
- border-top: 1px solid @divider-color;
+ border-top: 1px solid transparent;
+ // Chrome not accept `inherit` in `border-top`
+ border-top-color: inherit;
+ border-bottom: 0;
transform: translateY(50%);
content: '';
}
diff --git a/components/form/__tests__/__snapshots__/demo.test.js.snap b/components/form/__tests__/__snapshots__/demo.test.js.snap
index e50d10f3aa..5ccb6a3818 100644
--- a/components/form/__tests__/__snapshots__/demo.test.js.snap
+++ b/components/form/__tests__/__snapshots__/demo.test.js.snap
@@ -5612,7 +5612,7 @@ exports[`renders ./components/form/demo/validate-other.md correctly 1`] = `
class="ant-col ant-col-6 ant-form-item-label"
>
diff --git a/components/form/demo/validate-other.md b/components/form/demo/validate-other.md
index 9c7c71da4b..deb7d8c635 100644
--- a/components/form/demo/validate-other.md
+++ b/components/form/demo/validate-other.md
@@ -120,7 +120,11 @@ const Demo = () => {
-
+
item 1
item 2
diff --git a/components/form/index.en-US.md b/components/form/index.en-US.md
index 0ddbc482fd..abf390ebf5 100644
--- a/components/form/index.en-US.md
+++ b/components/form/index.en-US.md
@@ -84,22 +84,10 @@ Form field component for data bidirectional binding, validation, layout, and so
| noStyle | No style for `true`, used as a pure field control | boolean | false | |
| label | Label text | string \| ReactNode | - | |
| labelAlign | The text align of label | `left` \| `right` | `right` | |
-| labelCol | The layout of label. You can set `span` `offset` to something like `{span: 3, offset: 12}` or `sm: {span: 3, offset: 12}` same as with ` `. You can set `labelCol` on Form. If both exists, use Item first | [object](/components/grid/#Col) | - | |
-| messageVariables | default validate filed info | Record | - | 4.7.0 |
-| name | Field name, support array | [NamePath](#NamePath) | - | |
-| normalize | Normalize value from component value before passing to Form instance | (value, prevValue, prevValues) => any | - | |
-| preserve | Keep field value even when field removed | boolean | true | 4.4.0 |
-| required | Display required style. It will be generated by the validation rule | boolean | false | |
-| rules | Rules for field validation. Click [here](#components-form-demo-basic) to see an example | [Rule](#Rule)[] | - | |
-| shouldUpdate | Custom field update logic. See [below](#shouldUpdate) | boolean \| (prevValue, curValue) => boolean | false | |
-| tooltip | Config tooltip info | ReactNode \| [TooltipProps & { icon: ReactNode }](/components/tooltip#API) | - | 4.7.0 |
-| trigger | When to collect the value of children node | string | `onChange` | |
-| validateFirst | Whether stop validate on first rule of error for this field. Will parallel validate when `parallel` cofigured | boolean \| `parallel` | false | `parallel`: 4.5.0 |
-| validateStatus | The validation status. If not provided, it will be generated by validation rule. options: `success` `warning` `error` `validating` | string | - | |
-| validateTrigger | When to validate the value of children node | string \| string[] | `onChange` | |
-| valuePropName | Props of children node, for example, the prop of Switch is 'checked'. This prop is an encapsulation of `getValueProps`, which will be invalid after customizing `getValueProps` | string | `value` | |
-| wrapperCol | The layout for input controls, same as `labelCol`. You can set `wrapperCol` on Form. If both exists, use Item first | [object](/components/grid/#Col) | - | |
-| hidden | Whether to hide Form.Item (still collect and validate value) | boolean | false | |
+
+<<<<<<< HEAD | labelCol | The layout of label. You can set `span` `offset` to something like `{span: 3, offset: 12}` or `sm: {span: 3, offset: 12}` same as with ` `. You can set `labelCol` on Form. If both exists, use Item first | [object](/components/grid/#Col) | - | | | messageVariables | default validate filed info | Record | - | 4.7.0 | ======= | labelCol | The layout of label. You can set `span` `offset` to something like `{span: 3, offset: 12}` or `sm: {span: 3, offset: 12}` same as with ` `. You can set `labelCol` on Form which will not affect nest Item. If both exists, use Item first | [object](/components/grid/#Col) | - | |
+
+> > > > > > > origin/master | name | Field name, support array | [NamePath](#NamePath) | - | | | normalize | Normalize value from component value before passing to Form instance | (value, prevValue, prevValues) => any | - | | | preserve | Keep field value even when field removed | boolean | true | 4.4.0 | | required | Display required style. It will be generated by the validation rule | boolean | false | | | rules | Rules for field validation. Click [here](#components-form-demo-basic) to see an example | [Rule](#Rule)[] | - | | | shouldUpdate | Custom field update logic. See [below](#shouldUpdate) | boolean \| (prevValue, curValue) => boolean | false | | | tooltip | Config tooltip info | ReactNode \| [TooltipProps & { icon: ReactNode }](/components/tooltip#API) | - | 4.7.0 | | trigger | When to collect the value of children node | string | `onChange` | | | validateFirst | Whether stop validate on first rule of error for this field. Will parallel validate when `parallel` cofigured | boolean \| `parallel` | false | `parallel`: 4.5.0 | | validateStatus | The validation status. If not provided, it will be generated by validation rule. options: `success` `warning` `error` `validating` | string | - | | | validateTrigger | When to validate the value of children node | string \| string[] | `onChange` | | | valuePropName | Props of children node, for example, the prop of Switch is 'checked'. This prop is an encapsulation of `getValueProps`, which will be invalid after customizing `getValueProps` | string | `value` | | | wrapperCol | The layout for input controls, same as `labelCol`. You can set `wrapperCol` on Form which will not affect nest Item. If both exists, use Item first | [object](/components/grid/#Col) | - | | | hidden | Whether to hide Form.Item (still collect and validate value) | boolean | false | |
After wrapped by `Form.Item` with `name` property, `value`(or other property defined by `valuePropName`) `onChange`(or other property defined by `trigger`) props will be added to form controls, the flow of form data will be handled by Form which will cause:
@@ -393,6 +381,25 @@ In each `onFieldsChange`, you will get `false` > `true` > `false` with `isFieldV
Form.List use renderProps which mean internal structure is flexible. Thus `label` and `error` can not have best place. If you want to use antd `label`, you can wrap with Form.Item instead.
+### Why Form.Item `dependencies` can not work on Form.List field?
+
+Your name path should also contain Form.List `name`:
+
+```tsx
+
+ {fields =>
+ fields.map(field => (
+
+
+
+
+ ))
+ }
+
+```
+
+dependencies should be `['users', 0, 'name']`
+