We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
import React from 'react' import Cascader from '@hi-ui/hiui/es/cascader' class Demo extends React.Component { constructor () { super() this.state = { options: [] } } render(){ return( <Cascader onChange={(value)=>{ console.log('on change', value) }} data={this.state.options} style={{ width: 240 }} defaultValue={['电视','小米电视4C']} onOpen={()=>{ const {options} = this.state if(options.length === 0){ setTimeout(()=>{ this.setState({ options: [ { id: '手机', content: '手机', children: [ { id: '手机2', content: '手机2', } ] }, { id: '平板', content: '平板' }, { id: 'mix', content: 'Mix', children: [] } ] }) }, 2000) } }} onActiveItemChange={values=>{ if(values[0] == 'mix') { setTimeout(()=>{ const _options = this.state.options _options[2].children = [ { id: 'mix1', content: 'Mix1' },{ id: 'mix2', content: 'Mix2' },{ id: 'mix3', content: 'Mix3' } ] this.setState({ options: _options }) }, 1000) } }} /> ) } }
The text was updated successfully, but these errors were encountered:
fix: #1854 #1875
be42eaf
47f4f54
Merge pull request #1876 from XiaoMi/hotfix/#1875
3bda485
Successfully merging a pull request may close this issue.
The text was updated successfully, but these errors were encountered: