From 6c4ef8dbeb6f3d94efeaed8baba493a5331093e7 Mon Sep 17 00:00:00 2001 From: zombiej Date: Tue, 22 Jun 2021 11:56:12 +0800 Subject: [PATCH] chore: Update jsdoc comment of internal api & rm combo box limit --- src/generate.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/generate.tsx b/src/generate.tsx index e433df72a..0721e8fab 100644 --- a/src/generate.tsx +++ b/src/generate.tsx @@ -131,6 +131,7 @@ export interface SelectProps extends Re notFoundContent?: React.ReactNode; placeholder?: React.ReactNode; backfill?: boolean; + /** @private Internal usage. Do not use in your production. */ getInputElement?: () => JSX.Element; optionLabelProp?: string; maxTagTextLength?: number; @@ -634,9 +635,9 @@ export default function generateSelector< }; // ============================= Input ============================== - // Only works in `combobox` + // Only works in `combobox` or `rc-cascader` const customizeInputElement: React.ReactElement = - (mode === 'combobox' && getInputElement && getInputElement()) || null; + (typeof getInputElement === 'function' && getInputElement()) || null; // ============================== Open ============================== const [innerOpen, setInnerOpen] = useMergedState(undefined, {