Skip to content

Commit 35ab3bd

Browse files
committed
fix: optionFilterProp not support children #3204
1 parent 8da63a6 commit 35ab3bd

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

antdv-demo

components/vc-select/generate.tsx

+6-1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ import {
5454
import createRef from '../_util/createRef';
5555
import PropTypes, { withUndefined } from '../_util/vue-types';
5656
import initDefaultProps from '../_util/props-util/initDefaultProps';
57+
import warning from '../_util/warning';
5758

5859
const DEFAULT_OMIT_PROPS = [
5960
'children',
@@ -341,7 +342,11 @@ export default function generateSelector<
341342
const useInternalProps = computed(
342343
() => props.internalProps && props.internalProps.mark === INTERNAL_PROPS_MARK,
343344
);
344-
345+
warning(
346+
props.optionFilterProp !== 'children',
347+
'Select',
348+
'optionFilterProp not support children, please use label instead',
349+
);
345350
const containerRef = ref(null);
346351
const triggerRef = ref(null);
347352
const selectorRef = ref(null);

0 commit comments

Comments
 (0)