From 0d732d6c5c9116389271805759df007825c57d59 Mon Sep 17 00:00:00 2001 From: 1wy122791 Date: Mon, 19 Aug 2019 20:47:55 +0800 Subject: [PATCH] fix(Select): readonly --- src/select/select.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/select/select.jsx b/src/select/select.jsx index a0a648f286..6f61db7dba 100644 --- a/src/select/select.jsx +++ b/src/select/select.jsx @@ -634,6 +634,8 @@ class Select extends Base { * It MUST be multiple mode, needn't additional judgement */ handleTagClose(item) { + const { readOnly } = this.props; + if (readOnly) return false; if (this.useDetailValue()) { const value = this.state.value.filter(v => { return item.value !== v.value; @@ -865,8 +867,7 @@ class Select extends Base { handleClear = e => { e.stopPropagation(); - const { onSearchClear } = this.props; - !!onSearchClear && onSearchClear('select'); + this.handleChange(undefined, 'clear'); };