Commit 83e120f5 authored by zhangwenshuai's avatar zhangwenshuai

修改textSelect

parent 99f4f85f
...@@ -137,7 +137,11 @@ class TextSelect extends React.Component<Props, State> { ...@@ -137,7 +137,11 @@ class TextSelect extends React.Component<Props, State> {
onChange = (obj) => { onChange = (obj) => {
const { onChange } = this.props; const { onChange } = this.props;
if (typeof onChange === 'function') { if (typeof onChange === 'function') {
onChange(obj); if (!obj || (!obj.label && !obj.value)) {
onChange(undefined);
} else {
onChange(obj);
}
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment