From 35ab3bd8c0bc92b2a5a556821675e38b665cd977 Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Tue, 17 Nov 2020 22:51:00 +0800 Subject: [PATCH] fix: optionFilterProp not support children #3204 --- antdv-demo | 2 +- components/vc-select/generate.tsx | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/antdv-demo b/antdv-demo index b24360cc91..7cccccbb55 160000 --- a/antdv-demo +++ b/antdv-demo @@ -1 +1 @@ -Subproject commit b24360cc91640d63e25b88bbecdb530823af8913 +Subproject commit 7cccccbb5571e61b35aca0d454eb83bc5924995e diff --git a/components/vc-select/generate.tsx b/components/vc-select/generate.tsx index 6aa40497fb..8fc5d4e056 100644 --- a/components/vc-select/generate.tsx +++ b/components/vc-select/generate.tsx @@ -54,6 +54,7 @@ import { import createRef from '../_util/createRef'; import PropTypes, { withUndefined } from '../_util/vue-types'; import initDefaultProps from '../_util/props-util/initDefaultProps'; +import warning from '../_util/warning'; const DEFAULT_OMIT_PROPS = [ 'children', @@ -341,7 +342,11 @@ export default function generateSelector< const useInternalProps = computed( () => props.internalProps && props.internalProps.mark === INTERNAL_PROPS_MARK, ); - + warning( + props.optionFilterProp !== 'children', + 'Select', + 'optionFilterProp not support children, please use label instead', + ); const containerRef = ref(null); const triggerRef = ref(null); const selectorRef = ref(null);