Comments (5)
有个配置叫labelinvalue 你看一下
from pro-components.
有个配置叫labelinvalue 你看一下
当select 里的值不修改的时候, labelinvalue 不起效果,transform={(value, namePath, allValues)=>{} 里的value 是label ,只有下拉框里选一个值, value 才会变成{lable:'', value:''},这个属性才会有效果
from pro-components.
https://codesandbox.io/p/sandbox/modal-biao-dan-forked-25dgx2
试了一下,没问题啊,不重新选择的情况下, select字段transform打印的是{label: '',value''}
,最后提交打印的也是{label: '',value''}
from pro-components.
https://codesandbox.io/p/sandbox/modal-biao-dan-forked-25dgx2
试了一下,没问题啊,不重新选择的情况下, select字段transform打印的是
{label: '',value''}
,最后提交打印的也是{label: '',value''}
因为你初始化的时候,给的结构里包含了lable, value select: {
label: "测试1",
value: "test1",
},
我服务端返回的结构是 let initialValues = {
other:"",
display_name:"dispaly name",
display_id:"123",
}, select 的 name 等于 display_name,display_id 等于 select value,
服务端不能直接提供这样的结构 select:{
label: "dispaly name",
value: "123",
}
不知道客户端是否有简单方式可以处理这种情况?
from pro-components.
我能想到的解决颁发:
- 获取到后端返回值后重新整理一下,再赋值给
initValues
- 还是目前这样赋值给
initValues
,然后valueEnme
或者request
给组件提供包含当前value
的选择项,这样也没问题
from pro-components.
Related Issues (20)
- 🐛[BUG]秒格式化字段类型负数会错误显示 HOT 1
- 👑 [需求]ProTable 里配置columns , valueType: 'treeSelect'的时候,有个场景跟antd的TreeSelect组件不符 HOT 6
- 🧐[问题] Schema Form的valueType:formList,renderFormItem失效
- 🐛[BUG] ModalForm 子元素的`transform`函数会在初始化时触发且忽视`convertValue` HOT 5
- 🐛[BUG] ProTable filterType:'light'时,时间区间相关组件展示与valueType 不符合
- ProLayout的Sider Token没有字体大小设置,使用全局的ConfigProvidert又不生效, 难道没人觉得左侧菜单栏的字体14px太小了吗 HOT 3
- 为什么 DrawerForm onFinish 后 会造成 ProFormDependency 重新渲染 或其 依赖项重新触发 onChange?
- 🧐[问题] HOT 1
- 官网地址打开白屏 HOT 6
- 🐛[BUG]: Virtual ProTable is not able to scroll horizontally in mobile device
- 🐛[BUG] ProFormRadio.Group的className、rootClassName、style等属性不生效 HOT 1
- EditableProTable能修改 popover 校验提示框的方向吗?(默认是 top,希望修改为left)
- Warning: findDOMNode is deprecated and will be removed in the next major release. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: HOT 7
- ProFormSelect doesn't have a loading state HOT 1
- 🐛[BUG] - Filter in Column don't seem to work HOT 2
- 🧐[问题]如何修改pro-component的样式 HOT 5
- select 滚动条,数据量在9条10条的时候,不展示滚动样式
- 👑 [需求] ProForm 表单 form 元素的 nativeElement
- 🐛[BUG] CellEditorTable 单元格编辑,显示的内容是之前的值,并且如果里面渲染日期组件的话,onchange事件监听不到
- 🐛[BUG] ConfigProvider 设置 hashed: false 无效,因为被 ProLayout 里的给覆盖了
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 pro-components.