Comments (2)
NoForm是基于渲染子组件的didMount来上报子元素的name的,所以无法在渲染前获取所有子元素。有以下两个办法可以解决(其实作用都一样)
- initialized
new FormCore({
initialized: () => {
formCore.children.map(item => item.name).filter(name => !name.startsWith('__'))
}
});
- 在didMount里能获取
formCore.children.map(item => item.name).filter(name => !name.startsWith('__'))
from alist.
备注:之所以需要过滤 __ 是因为NoForm 把无名FormItem 及 If 也赋予了随机name,因此需要过滤掉
from alist.
Related Issues (20)
- core/form scrollToError not work HOT 1
- Repeater组件的每一行能否增加自定义按钮功能?自定义按钮支持条件显示? HOT 1
- 可否添加错误信息? HOT 1
- repeater 可否支持排序操作 HOT 1
- please correct the url typo HOT 1
- Typescript定义能否完善一些呢noform 和 nowrapper HOT 1
- 嵌套Form验证问题 HOT 1
- Repeater 嵌套 Repeater 时,第二个 repeater 新增按钮,需要点击两次 HOT 2
- 在 FormItem 里使用 render 渲染组件,在组件上 onChange 事件里 set 两个表单值,导致validate失效 HOT 1
- 使用React Hooks的问题 HOT 1
- 手册经常打不开 HOT 1
- 列表第一次渲染时,设置selectedRowKeys无效 HOT 4
- How does NoForm implement additional form tips in ANTD, such as :Extra
- 项目文档编写中西文混排时,单词左右要么留一个空格, 要么不留空格,统一下
- can't get all selections when pagination changed HOT 1
- formily2什么时候能支持? HOT 8
- The official website https certificate has expired
- 自定义布局
- @alist/antd @alist/antd-components 能否在package.json 中增加module字段
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 alist.