-
Notifications
You must be signed in to change notification settings - Fork 99
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
hiui Cascader value 的值必须是字符串类型,如果是Number 类型会导致节点重复添加的交互问题 #1648
Labels
Comments
GleanCoder1116
added
bug
Something isn't working
and removed
enhancement
New feature or request
labels
Apr 7, 2021
Merged
Merged
GleanCoder1116
changed the title
hiui 2.0 Cascader value 的值必须是字符串类型,如果是Number 类型会导致节点重复添加的交互问题
hiui Cascader value 的值必须是字符串类型,如果是Number 类型会导致节点重复添加的交互问题
Apr 7, 2021
Merged
Merged
GleanCoder1116
added a commit
that referenced
this issue
Apr 8, 2021
Flcwl
added a commit
that referenced
this issue
Apr 23, 2021
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
复现如下:
import React from 'react'
import Cascader from '@hi-ui/hiui/es/cascader'
class Demo extends React.Component {
constructor () {
super()
this.state = {
options: [{"id":6534,"categoryType":"CONSUMABLE_MATERIALS","status":1,"path":"0-6534","children":null,"treeNodeIds":[6534],"title":"钢网[6534]"},{"id":6476,"categoryType":"CONSUMABLE_MATERIALS","status":1,"path":"0-6476","children":[{"id":6551,"categoryType":"CONSUMABLE_MATERIALS","status":1,"path":"0-6476-6551","children":[{"id":6555,"categoryType":"CONSUMABLE_MATERIALS","status":1,"path":"0-6476-6551-6555","children":[{"id":6557,"categoryType":"CONSUMABLE_MATERIALS","status":1,"path":"0-6476-6551-6555-6557","children":null,"treeNodeIds":[6557],"title":"钢网3-2-2[6476-6551-6555-6557]"},{"id":6556,"categoryType":"CONSUMABLE_MATERIALS","status":1,"path":"0-6476-6551-6555-6556","children":null,"treeNodeIds":[6556],"title":"钢网3-2-1[6476-6551-6555-6556]"}],"treeNodeIds":[6555,6556,6557],"title":"钢网3-2[6476-6551-6555]"},{"id":6552,"categoryType":"CONSUMABLE_MATERIALS","status":1,"path":"0-6476-6551-6552","children":[{"id":6558,"categoryType":"CONSUMABLE_MATERIALS","status":1,"path":"0-6476-6551-6552-6558","children":null,"treeNodeIds":[6558],"title":"钢网3-1-2[6476-6551-6552-6558]"},{"id":6553,"categoryType":"CONSUMABLE_MATERIALS","status":1,"path":"0-6476-6551-6552-6553","children":null,"treeNodeIds":[6553],"title":"钢网5[6476-6551-6552-6553]"}],"treeNodeIds":[6552,6553,6558],"title":"钢网3[6476-6551-6552]"}],"treeNodeIds":[6551,6552,6553,6555,6556,6557,6558],"title":"钢网2[6476-6551]"}],"treeNodeIds":[6551,6552,6553,6555,6556,6476,6557,6558],"title":"未分类辅耗材[6476]"},{"id":6478,"categoryType":"CONSUMABLE_MATERIALS","status":1,"path":"0-6478","children":[{"id":6554,"categoryType":"CONSUMABLE_MATERIALS","status":1,"path":"0-6478-6554","children":null,"treeNodeIds":[6554],"title":"刮刀1[6478-6554]"}],"treeNodeIds":[6554,6478],"title":"刮刀[6478]"},{"id":6533,"categoryType":"CONSUMABLE_MATERIALS","status":1,"path":"0-6533","children":null,"treeNodeIds":[6533],"title":"锡膏[6533]"}]
}
}
render(){
return(
<Cascader
fieldNames={{
label: 'title',
value: 'path',
children: 'children',
}}
onChange={(id)=>{
console.log('on change', id)
}}
data={this.state.options}
style={{ width: 240 }}
/>
)
}
}
The text was updated successfully, but these errors were encountered: