Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* fix ant-design#9907

* update snapshot
  • Loading branch information
ddcat1115 authored and afc163 committed Apr 4, 2018
1 parent d718340 commit a402fdd
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 12 deletions.
20 changes: 10 additions & 10 deletions components/form/__tests__/__snapshots__/demo.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ exports[`renders ./components/form/demo/advanced-search.md correctly 1`] = `
class="ant-form-item-label"
>
<label
class=""
class="ant-form-item-required"
for="field-0"
title="Field 0"
>
Expand Down Expand Up @@ -61,7 +61,7 @@ exports[`renders ./components/form/demo/advanced-search.md correctly 1`] = `
class="ant-form-item-label"
>
<label
class=""
class="ant-form-item-required"
for="field-1"
title="Field 1"
>
Expand Down Expand Up @@ -102,7 +102,7 @@ exports[`renders ./components/form/demo/advanced-search.md correctly 1`] = `
class="ant-form-item-label"
>
<label
class=""
class="ant-form-item-required"
for="field-2"
title="Field 2"
>
Expand Down Expand Up @@ -143,7 +143,7 @@ exports[`renders ./components/form/demo/advanced-search.md correctly 1`] = `
class="ant-form-item-label"
>
<label
class=""
class="ant-form-item-required"
for="field-3"
title="Field 3"
>
Expand Down Expand Up @@ -184,7 +184,7 @@ exports[`renders ./components/form/demo/advanced-search.md correctly 1`] = `
class="ant-form-item-label"
>
<label
class=""
class="ant-form-item-required"
for="field-4"
title="Field 4"
>
Expand Down Expand Up @@ -225,7 +225,7 @@ exports[`renders ./components/form/demo/advanced-search.md correctly 1`] = `
class="ant-form-item-label"
>
<label
class=""
class="ant-form-item-required"
for="field-5"
title="Field 5"
>
Expand Down Expand Up @@ -266,7 +266,7 @@ exports[`renders ./components/form/demo/advanced-search.md correctly 1`] = `
class="ant-form-item-label"
>
<label
class=""
class="ant-form-item-required"
for="field-6"
title="Field 6"
>
Expand Down Expand Up @@ -307,7 +307,7 @@ exports[`renders ./components/form/demo/advanced-search.md correctly 1`] = `
class="ant-form-item-label"
>
<label
class=""
class="ant-form-item-required"
for="field-7"
title="Field 7"
>
Expand Down Expand Up @@ -348,7 +348,7 @@ exports[`renders ./components/form/demo/advanced-search.md correctly 1`] = `
class="ant-form-item-label"
>
<label
class=""
class="ant-form-item-required"
for="field-8"
title="Field 8"
>
Expand Down Expand Up @@ -389,7 +389,7 @@ exports[`renders ./components/form/demo/advanced-search.md correctly 1`] = `
class="ant-form-item-label"
>
<label
class=""
class="ant-form-item-required"
for="field-9"
title="Field 9"
>
Expand Down
7 changes: 6 additions & 1 deletion components/form/demo/advanced-search.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,12 @@ class AdvancedSearchForm extends React.Component {
children.push(
<Col span={8} key={i} style={{ display: i < count ? 'block' : 'none' }}>
<FormItem label={`Field ${i}`}>
{getFieldDecorator(`field-${i}`)(
{getFieldDecorator(`field-${i}`, {
rules: [{
required: true,
message: 'Input something!',
}],
})(
<Input placeholder="placeholder" />
)}
</FormItem>
Expand Down
6 changes: 5 additions & 1 deletion components/form/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,11 @@ form {

.@{ant-prefix}-advanced-search-form {
.@{form-prefix-cls}-item {
margin-bottom: 24px;
margin-bottom: @form-item-margin-bottom;

&-with-help {
margin-bottom: @form-item-margin-bottom - @font-size-base * @line-height-base - @form-help-margin-top;
}
}
}

Expand Down

0 comments on commit a402fdd

Please sign in to comment.