Skip to content

Commit

Permalink
fix: optionFilterProp not support children #3204
Browse files Browse the repository at this point in the history
  • Loading branch information
tangjinzhou committed Nov 17, 2020
1 parent 8da63a6 commit 35ab3bd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion antdv-demo
7 changes: 6 additions & 1 deletion components/vc-select/generate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 35ab3bd

Please sign in to comment.