From 1e6e425bfce52f8dc4c871a33b2a08f095641e2d Mon Sep 17 00:00:00 2001 From: liaoxuezhi Date: Mon, 19 Aug 2019 18:56:37 +0800 Subject: [PATCH] =?UTF-8?q?Select=20option=20=E6=94=AF=E6=8C=81=20tip=20?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Select.tsx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/components/Select.tsx b/src/components/Select.tsx index 90778015b..f9bbfeab1 100644 --- a/src/components/Select.tsx +++ b/src/components/Select.tsx @@ -537,13 +537,11 @@ export class Select extends React.Component { ? item[labelField] : highlight(item[labelField], inputValue as string, cx('Select-option-hl'))} + ) : item.isNew ? ( + promptTextCreator(item.label as string) ) : ( - item.isNew - ? promptTextCreator(item.label as string) - : item.disabled - ? item[labelField] - : highlight(item[labelField], inputValue as string, cx('Select-option-hl')) - )} + {item.disabled ? item.label : highlight(item[labelField], inputValue as string, cx('Select-option-hl'))}{item.tip} + )} )}) ) : (