-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
Reproduction link
https://stackblitz.com/edit/ng-alain-setup
Steps to reproduce
{
type: 'number',
title: this.i18n.fanyi('app.filter.label.department'),
ui: {
changeOnSelect:true,
widget: 'cascader',
placeholder: this.i18n.fanyi('vehicle.filter.placeholder.department'),
class: 'selected-department',
allowClear: true,
showArrow: true,
menuClassName: 'departments-menu',
columnClassName: 'department-column',
change: (value: number[]) => {
onChange(value);
},
asyncData: (node) => {
if (node.level >= 0) {
return this.departmentWidgetService.getRolesByDepartment(node);
} else {
return new Promise(resolve => {
setTimeout(() => {
this.departmentWidgetService.initDepartments().then((res) => {
(node as any).children = res;
resolve();
});
},);
});
}
},
} as SFCascaderWidgetSchema,
};
in this case if i choose something that has children and then something without children it still show the children of the previous one.
What is expected?
if there are no children - don't show the "children menu"
What is actually happening?
showing the children of the previous one
Environment | Info |
---|---|
ng-alain | 9.5.5 |
Browser | chrome |
Metadata
Metadata
Assignees
Labels
No labels