-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
cascader can not filter correctly when a node has no children #2104
Comments
@zd5043039119 Please provide the edit link, not just the demo. |
@wendzhue Updated |
@zd5043039119 You didn't mark the node as |
But it do have a problem. I would fix it for another issue. |
@wendzhue i updated the reproduction link and mark the node as const loopParent = (node: CascaderOption, forceDisabled = false) => {
const disabled = forceDisabled || node.disabled;
path.push(node);
node.children.forEach((sNode) => {
if (!sNode.parent) { sNode.parent = node; } /** 搜索的同时建立 parent 连接,因为用户直接搜索的话是没有建立连接的,会提升从叶子节点回溯的难度 */
if (!sNode.isLeaf) { loopParent(sNode, disabled); }
if (sNode.isLeaf || !sNode.children) { loopChild(sNode, disabled); }
});
path.pop();
}; node.children is empty and |
@zd5043039119 Yes that's a reason. Since you have found the reason, are you interested in firing a pull request to fix this? |
sure, i'll try |
This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread. |
Version
1.4.1
Environment
Angular 6.1.3,Chrome 67.0.3396.87
Reproduction link
https://stackblitz.com/edit/ng-zorro-antd-start-mshvaz
Steps to reproduce
What is expected?
能出现高亮的Test选项
What is actually happening?
Not Found
Other?
The text was updated successfully, but these errors were encountered: