fix: disabled option are not selectable, close: #4699

This commit is contained in:
Benjy Cui 2017-02-13 11:55:12 +08:00
parent 200b88246f
commit 1f223d8e4c
2 changed files with 5 additions and 0 deletions

View File

@ -25,6 +25,10 @@ const options = [{
children: [{
value: 'xihu',
label: 'West Lake',
}, {
value: 'xiasha',
label: 'Xia Sha',
disabled: true,
}],
}],
}, {

View File

@ -239,6 +239,7 @@ export default class Cascader extends React.Component<CascaderProps, any> {
path,
label: render(inputValue, path, prefixCls),
value: path.map(o => o.value),
disabled: path.some(o => o.disabled),
};
});
}