From e875bf3f602eeab7c8d6cd029ffdef7293fa34ee Mon Sep 17 00:00:00 2001 From: zombiej Date: Thu, 2 Dec 2021 11:19:01 +0800 Subject: [PATCH] chore: rm Object.values --- src/OptionList.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/OptionList.tsx b/src/OptionList.tsx index ccb822192..14aa26dcd 100644 --- a/src/OptionList.tsx +++ b/src/OptionList.tsx @@ -265,7 +265,8 @@ const OptionList: React.ForwardRefRenderFunction< ); } - const omitFieldNameList = Object.values(fillFieldNames(fieldNames)); + const filledFieldNames = fillFieldNames(fieldNames); + const omitFieldNameList = Object.keys(filledFieldNames).map((key) => filledFieldNames[key]); const renderItem = (index: number) => { const item = memoFlattenOptions[index];