From f4fcecf6b6049871bfad6863f787b34559e98251 Mon Sep 17 00:00:00 2001 From: liaoxuezhi Date: Tue, 22 Oct 2019 11:20:36 +0800 Subject: [PATCH] =?UTF-8?q?select=20noResultText=20=E6=94=AF=E6=8C=81=20Ht?= =?UTF-8?q?ml=20=E6=A0=87=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderers/Form/Select.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/renderers/Form/Select.tsx b/src/renderers/Form/Select.tsx index 6d852e2cc..f32203456 100644 --- a/src/renderers/Form/Select.tsx +++ b/src/renderers/Form/Select.tsx @@ -168,7 +168,7 @@ export default class SelectControl extends React.Component { } render() { - const { + let { autoComplete, searchable, options, @@ -184,9 +184,15 @@ export default class SelectControl extends React.Component { classnames, creatable, inline, + noResultsText, + render, ...rest } = this.props; + if (noResultsText && /<\w+/.test(noResultsText)) { + noResultsText = render('noResultText', noResultsText); + } + return (