Skip to content

Commit f9f7456

Browse files
bindoonyouluna
authored andcommitted
fix(Select): only close popup in disabled state. fix #2072
1 parent 916f0f0 commit f9f7456

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/select/base.jsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,8 @@ export default class Base extends React.Component {
287287
* @param {string} type trigger type
288288
*/
289289
setVisible(visible, type) {
290-
if (this.props.disabled || this.state.visible === visible) {
290+
// disabled 状态下只允许关闭不允许打开
291+
if ((this.props.disabled && visible) || this.state.visible === visible) {
291292
return;
292293
}
293294

0 commit comments

Comments
 (0)