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
CascaderSelect
多选情况下,如果先选择一个二级节点,再继续点击一个没有子节点的顶级节点时,二级菜单不会自动收回。
重现链接: https://fusion.design/pc/component/cascader-select?themeid=2#expandedValue-container
按代码注释中把几个顶级节点的children置空就可以重现问题:
import { CascaderSelect } from '@alifd/next'; class Demo extends React.Component { constructor(props) { super(props); this.state = { data: [] }; this.handleChange = this.handleChange.bind(this); } componentDidMount() { fetch('https://os.alipayobjects.com/rmsportal/ODDwqcDFTLAguOvWEolX.json') .then(response => response.json()) .then(data => { // 这里把几个顶级节点的children置空就可以重现问题 data[1].children = []; data[2].children = []; this.setState({ data }); }) .catch(e => console.log(e)); } handleChange(value, data, extra) { console.log(value, data, extra); } render() { return <CascaderSelect multiple dataSource={this.state.data} onChange={this.handleChange} />; } } ReactDOM.render(<Demo />, mountNode);
The text was updated successfully, but these errors were encountered:
fix(Cascader): add setExpandedBy to differentiate the change type at …
790d4fe
…getDerivedStateFromProps, close #4472
fix(Cascader): first level menu always can collapse next level menus, c…
c8ed0b5
…lose #4472 (#4502)
YSMJ1994
Successfully merging a pull request may close this issue.
Component
CascaderSelect
Steps to reproduce
多选情况下,如果先选择一个二级节点,再继续点击一个没有子节点的顶级节点时,二级菜单不会自动收回。
重现链接:
https://fusion.design/pc/component/cascader-select?themeid=2#expandedValue-container
按代码注释中把几个顶级节点的children置空就可以重现问题:
The text was updated successfully, but these errors were encountered: