-
-
Notifications
You must be signed in to change notification settings - Fork 50.2k
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
feat: New Form #17327
feat: New Form #17327
Conversation
Remove thisant-design/components/form-legacy/index.tsx Lines 1 to 4 in 067abdb
This comment was generated by todo based on a
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add tests to make sure this change works as expected?
handle thisant-design/components/form/FormItem.tsx Lines 141 to 146 in 067abdb
This comment was generated by todo based on a
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This pull request fixes 1 alert when merging 013281c into f589577 - view on LGTM.com fixed alerts:
|
This pull request fixes 1 alert when merging 0ac86bd into f589577 - view on LGTM.com fixed alerts:
|
This pull request fixes 1 alert when merging 7705292 into f589577 - view on LGTM.com fixed alerts:
|
好像缺 |
This pull request fixes 1 alert when merging 52d8d48 into f589577 - view on LGTM.com fixed alerts:
|
This pull request fixes 1 alert when merging 80a3ee8 into f589577 - view on LGTM.com fixed alerts:
|
| hasFeedback | 配合 `validateStatus` 属性使用,展示校验状态图标,建议只配合 Input 组件使用 | boolean | false | | ||
| help | 提示信息,如不设置,则会根据校验规则自动生成 | string\|ReactNode | - | | ||
| htmlFor | 设置子元素 label `htmlFor` 属性 | string | - | | ||
| inline | 为 `true` 时不带样式,作为纯字段控件使用 | boolean | false | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个容易和样式里的 inline 概念混淆,有没有别的名字。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pure
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nostyle 如何
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noStyle
和现在的 naming standard 不太合,要不然直接 style={false}
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style={false}
和其他组件行为不一致,不好。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
那还是 inline
吧
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inline
表意不明,建议还是 noStyle
或者 withoutStyle
> label { | ||
position: relative; | ||
display: inline-block; | ||
margin-top: @form-label-margin-top; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That line created a misalignment when we use label and input with diff sizes, for ex:
<Input size="large"/>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Label position is a fixed value instead of related vertical center of the Item since some component like TextArea (or Transfer or Tree or some else) occupy the more height of it.
For the size diff component, maybe provides some other prop to handle (still in thinking).
} | ||
} | ||
|
||
.make-vertical-layout() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When will this feature be released ? |
You can try it by the latest RC version. |
interface FieldData { | ||
name: number; | ||
key: number; | ||
fieldKey: number; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these types correct?
🤔 This is a ...
👻 What's the background?
ref #16911
https://github.com/react-component/field-form/
📝 Changelog
☑️ Self Check before Merge
TODO
Preview
https://deploy-preview-17327--ant-design.netlify.com/components/form-cn/#header