diff --git a/src/tree-select/TreeSelect.tsx b/src/tree-select/TreeSelect.tsx index d87d0c6660..4adef34d4f 100644 --- a/src/tree-select/TreeSelect.tsx +++ b/src/tree-select/TreeSelect.tsx @@ -92,7 +92,19 @@ const TreeSelect = forwardRef((originalProps [props.keys], ); - const { normalizeValue, formatValue, getNodeItem } = useTreeSelectUtils(props, treeRef); + const passThroughDefaultStore = useMemo( + () => ({ + data, + treeProps: { + keys: tKeys, + ...treeProps, + }, + valueType, + }), + [tKeys, data, treeProps, valueType], + ); + + const { normalizeValue, formatValue, getNodeItem } = useTreeSelectUtils(passThroughDefaultStore, treeRef); useImperativeHandle(ref, () => ({ ...(selectInputRef.current || {}),