diff --git a/package.json b/package.json index 8bf2255e..c2b8babb 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "dependencies": { "@rc-component/select": "~1.11.0", "@rc-component/tree": "~1.5.0", - "@rc-component/util": "^1.11.1", + "@rc-component/util": "^1.13.0", "clsx": "^2.1.1" }, "devDependencies": { diff --git a/src/OptionList/Column.tsx b/src/OptionList/Column.tsx index 73afcc7c..fc80e4f4 100644 --- a/src/OptionList/Column.tsx +++ b/src/OptionList/Column.tsx @@ -1,6 +1,6 @@ import { clsx } from 'clsx'; import * as React from 'react'; -import { pickAttrs } from '@rc-component/util'; +import { isReactRenderable, pickAttrs } from '@rc-component/util'; import type { DefaultOptionType, SingleValueType } from '../Cascader'; import CascaderContext from '../context'; import { SEARCH_MARK } from '../hooks/useSearchOptions'; @@ -225,10 +225,10 @@ export default function Column {optionRender && value !== '__EMPTY__' ? optionRender(option) : label} - {!isLoading && expandIcon && !isMergedLeaf && ( + {!isLoading && isReactRenderable(expandIcon) && !isMergedLeaf && (
{expandIcon}
)} - {isLoading && loadingIcon && ( + {isLoading && isReactRenderable(loadingIcon) && (
{loadingIcon}
)}