From 5cb489fac8ff3f33b06f5425da1ed3897dd97a6c Mon Sep 17 00:00:00 2001 From: 2betop <2betop.cn@gmail.com> Date: Mon, 11 May 2020 19:44:23 +0800 Subject: [PATCH] =?UTF-8?q?expand=20=E6=94=B9=E6=88=90=20findTree?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Select.tsx | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/components/Select.tsx b/src/components/Select.tsx index db4f7fea..7127476a 100644 --- a/src/components/Select.tsx +++ b/src/components/Select.tsx @@ -13,7 +13,7 @@ import Downshift, {ControllerStateAndHelpers} from 'downshift'; import {closeIcon, Icon} from './icons'; // @ts-ignore import matchSorter from 'match-sorter'; -import {noop, isObject} from '../utils/helper'; +import {noop, isObject, findTree} from '../utils/helper'; import find from 'lodash/find'; import isPlainObject from 'lodash/isPlainObject'; import union from 'lodash/union'; @@ -84,19 +84,24 @@ export function value2array( } return value - .map((value: any) => expandValue(value, props)) + .map((value: any) => expandValue(value, props.options, props.valueField)) .filter((item: any) => item) as Array