Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FormItem colon disappers on responsive layout(grid) #18719

Closed
1 task done
hugobarragon opened this issue Sep 6, 2019 · 4 comments
Closed
1 task done

FormItem colon disappers on responsive layout(grid) #18719

hugobarragon opened this issue Sep 6, 2019 · 4 comments
Assignees

Comments

@hugobarragon
Copy link
Contributor

hugobarragon commented Sep 6, 2019

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

Form items with a responsive layout like this:

const formItemLayout = {
      labelCol: {
        xs: { span: 24 },
        sm: { span: 8 },
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 16 },
      },
    };

Open the running page on a new window and resize until the inputs go below the labels (mobile devices)
When reduce to mobile the inputs break a line down, witch is good, but the ':' colon disappears

What is expected?

on mobile and desktop, only the layout changes, so if the colon=true it should keep the ':' on mobile

What is actually happening?

the ':' disappears
colon-disapers

Environment Info
antd 3.23.2
React 16.1.1
System Windows 10
Browser Google Chrome Version 76.0.3809.132 (Official Build) (64-bit)

we use antd for 2 years on internal projects

@afc163
Copy link
Member

afc163 commented Sep 6, 2019

It is by designed, vertical layout don't have colon.

@afc163 afc163 closed this as completed Sep 6, 2019
@hugobarragon
Copy link
Contributor Author

hugobarragon commented Sep 6, 2019

It is by designed, vertical layout don't have colon.

1º the repo layout is 'horizontal', only the grid system|css changes it
2º where is that written at?
colon | change default props colon value of Form.Item | boolean | true

consider reopening, and if its feature update the DOCS?

yoyo837 added a commit that referenced this issue Sep 10, 2019
orzyyyy pushed a commit that referenced this issue Sep 10, 2019
* chore(docs): update for #18719

* better expression
@delphin92
Copy link

delphin92 commented Jul 22, 2021

It is by designed, vertical layout don't have colon.

Ok, it can be default behavior. But why I can change it and force vertical form to have colons?

I can write this:

<Form
  layout="vertical"
  colon={true}
>

And this:

<Form.Item
  colon={true}
>

But no one works as expected.

Please, reopen this issue.

@delphin92
Copy link

WA:

.with-colons.ant-form-vertical .ant-form-item-label > label::after {
  &:extend(.ant-form-item-label > label::after);
  display: block;
}
<Form className="with-colons">

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants