Browse Source

docs: unique id (#38422)

* docs: unique id

* test: Update snapshot
pull/38428/head
二货爱吃白萝卜 2 years ago
committed by GitHub
parent
commit
4a1622cd66
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 20
      components/form/__tests__/__snapshots__/demo-extend.test.ts.snap
  2. 14
      components/form/__tests__/__snapshots__/demo.test.ts.snap
  3. 2
      components/form/demo/dynamic-form-items-complex.md
  4. 2
      components/form/demo/dynamic-form-items-no-style.md

20
components/form/__tests__/__snapshots__/demo-extend.test.ts.snap

@ -5883,7 +5883,7 @@ exports[`renders ./components/form/demo/dynamic-form-items-complex.md extend con
<form
autocomplete="off"
class="ant-form ant-form-horizontal"
id="dynamic_form_nest_item"
id="dynamic_form_complex"
>
<div
class="ant-form-item"
@ -5896,7 +5896,7 @@ exports[`renders ./components/form/demo/dynamic-form-items-complex.md extend con
>
<label
class="ant-form-item-required"
for="dynamic_form_nest_item_area"
for="dynamic_form_complex_area"
title="Area"
>
Area
@ -5922,15 +5922,15 @@ exports[`renders ./components/form/demo/dynamic-form-items-complex.md extend con
class="ant-select-selection-search"
>
<input
aria-activedescendant="dynamic_form_nest_item_area_list_0"
aria-activedescendant="dynamic_form_complex_area_list_0"
aria-autocomplete="list"
aria-controls="dynamic_form_nest_item_area_list"
aria-controls="dynamic_form_complex_area_list"
aria-haspopup="listbox"
aria-owns="dynamic_form_nest_item_area_list"
aria-owns="dynamic_form_complex_area_list"
aria-required="true"
autocomplete="off"
class="ant-select-selection-search-input"
id="dynamic_form_nest_item_area"
id="dynamic_form_complex_area"
readonly=""
role="combobox"
style="opacity:0"
@ -5950,14 +5950,14 @@ exports[`renders ./components/form/demo/dynamic-form-items-complex.md extend con
>
<div>
<div
id="dynamic_form_nest_item_area_list"
id="dynamic_form_complex_area_list"
role="listbox"
style="height:0;width:0;overflow:hidden"
>
<div
aria-label="Beijing"
aria-selected="false"
id="dynamic_form_nest_item_area_list_0"
id="dynamic_form_complex_area_list_0"
role="option"
>
Beijing
@ -5965,7 +5965,7 @@ exports[`renders ./components/form/demo/dynamic-form-items-complex.md extend con
<div
aria-label="Shanghai"
aria-selected="false"
id="dynamic_form_nest_item_area_list_1"
id="dynamic_form_complex_area_list_1"
role="option"
>
Shanghai
@ -6145,7 +6145,7 @@ exports[`renders ./components/form/demo/dynamic-form-items-no-style.md extend co
<form
autocomplete="off"
class="ant-form ant-form-horizontal"
id="dynamic_form_nest_item"
id="dynamic_form_no_style"
>
<div
class="ant-form-item"

14
components/form/__tests__/__snapshots__/demo.test.ts.snap

@ -3366,7 +3366,7 @@ exports[`renders ./components/form/demo/dynamic-form-items-complex.md correctly
<form
autocomplete="off"
class="ant-form ant-form-horizontal"
id="dynamic_form_nest_item"
id="dynamic_form_complex"
>
<div
class="ant-form-item"
@ -3379,7 +3379,7 @@ exports[`renders ./components/form/demo/dynamic-form-items-complex.md correctly
>
<label
class="ant-form-item-required"
for="dynamic_form_nest_item_area"
for="dynamic_form_complex_area"
title="Area"
>
Area
@ -3405,15 +3405,15 @@ exports[`renders ./components/form/demo/dynamic-form-items-complex.md correctly
class="ant-select-selection-search"
>
<input
aria-activedescendant="dynamic_form_nest_item_area_list_0"
aria-activedescendant="dynamic_form_complex_area_list_0"
aria-autocomplete="list"
aria-controls="dynamic_form_nest_item_area_list"
aria-controls="dynamic_form_complex_area_list"
aria-haspopup="listbox"
aria-owns="dynamic_form_nest_item_area_list"
aria-owns="dynamic_form_complex_area_list"
aria-required="true"
autocomplete="off"
class="ant-select-selection-search-input"
id="dynamic_form_nest_item_area"
id="dynamic_form_complex_area"
readonly=""
role="combobox"
style="opacity:0"
@ -3546,7 +3546,7 @@ exports[`renders ./components/form/demo/dynamic-form-items-no-style.md correctly
<form
autocomplete="off"
class="ant-form ant-form-horizontal"
id="dynamic_form_nest_item"
id="dynamic_form_no_style"
>
<div
class="ant-form-item"

2
components/form/demo/dynamic-form-items-complex.md

@ -44,7 +44,7 @@ const App: React.FC = () => {
};
return (
<Form form={form} name="dynamic_form_nest_item" onFinish={onFinish} autoComplete="off">
<Form form={form} name="dynamic_form_complex" onFinish={onFinish} autoComplete="off">
<Form.Item name="area" label="Area" rules={[{ required: true, message: 'Missing area' }]}>
<Select options={areas} onChange={handleChange} />
</Form.Item>

2
components/form/demo/dynamic-form-items-no-style.md

@ -25,7 +25,7 @@ const App: React.FC = () => {
};
return (
<Form name="dynamic_form_nest_item" onFinish={onFinish} autoComplete="off">
<Form name="dynamic_form_no_style" onFinish={onFinish} autoComplete="off">
<Form.Item label="Users">
<Form.List name="users">
{(fields, { add, remove }) => (

Loading…
Cancel
Save