Comments (7)
增加属性 nameProp 默认 false
getFieldProps('xx',{nameProp:'name'}) =>{name: 'xx'}
from form.
默认 nameProp: 'name'
可好?因为增加这个返回值就是为了简化 FormItem
的 API,不希望因为这样就让 getFieldProps
变得复杂。
另外为什么就不能默认就返回 name
? 这应该不会有什么影响,虽然使用的场景不多。
from form.
污染组件 prop
from form.
默认 nameProp: 'name' 可好?因为增加这个返回值就是为了简化 FormItem 的 API,不希望因为这样就让 getFieldProps 变得复杂。
这样也不行是吧。。
from form.
不能默认返回组件可能不需要的信息
from form.
嗯,我再想一下有没有别的封装办法。。。
from form.
getFieldProps 等封装到 formItem
<FormItem form={this.props.form} name="xx" rules={}>
</Form>
from form.
Related Issues (20)
- 执行页面查询报如下的错:ETIMEDOUT 127.0.0.1:8000 HOT 2
- resetFields and setFieldsValue is not working when trigger is set to onBlur HOT 4
- [Question] FormInstance method HOT 2
- getFieldDecorator(id, options) id 是含有.的字符串,但是不想生成嵌套的values,怎么弄?
- 关于封装的时间组件,form如何拿到其中的值 HOT 1
- input每次输入导致整个form重绘
- Not expected values in onValuesChange method.
- setFieldsValue外部数据不起效果
- increased type safety via string literals HOT 1
- rc-form特殊场景下报错Cannot read property 'filter' of undefined
- how to remove some field?
- can't get fields value in onValuesChange callback when native input.
- createForm 没有转发 包裹组件的 ref
- 没有考虑 overflow 为 overlay 的情况,导致错误自动滚动不生效
- Form
- npm start
- How to handle virtual fields?
- why the getFieldValue return value is not initialValue ?
- 在2.4.10版本,validateFieldsAndScroll方法遇到错误不会滚动到错误位置版本 HOT 3
- Why hasn't a new version been released for more than two years HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from form.