From 8826c66fb8c94da8d5ed29c83d3b55f5fcaf4ea6 Mon Sep 17 00:00:00 2001 From: zyf <1246271707@qq.com> Date: Mon, 2 Sep 2024 13:07:04 +0800 Subject: [PATCH] =?UTF-8?q?sorter=E5=8F=82=E6=95=B0=E5=91=BD=E5=90=8D?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Select.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Select.tsx b/src/Select.tsx index b3f244ab..a8124b49 100644 --- a/src/Select.tsx +++ b/src/Select.tsx @@ -431,8 +431,8 @@ const Select = React.forwardRef { - const sortedOptions = [...options].sort((a, b) => + const sorter = (inputOptions: DefaultOptionType[]) => { + const sortedOptions = [...inputOptions].sort((a, b) => filterSort(a, b, { searchValue: mergedSearchValue }), ); return sortedOptions.map((item) => {