fix[Select|Cascader]: select multiple error & cascader error in ssr mode (#7377)

* docs: updating the `dropdownRender` description and jumps in the FAQ for Select

* fix: fix  select error in multiple mode

* fix: fix cascader select error in ssr mode
pull/7516/head
Carl Chen 7 months ago committed by GitHub
parent 162d1fcf95
commit c28c38d02e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -4,6 +4,7 @@ import type { DefaultOptionType, SingleValueType } from '../Cascader';
import { SEARCH_MARK } from '../hooks/useSearchOptions'; import { SEARCH_MARK } from '../hooks/useSearchOptions';
import type { Key } from '../../_util/type'; import type { Key } from '../../_util/type';
import { useInjectCascader } from '../context'; import { useInjectCascader } from '../context';
import { cloneVNode } from 'vue';
export const FIX_LABEL = '__cascader_fix_label__'; export const FIX_LABEL = '__cascader_fix_label__';
export interface ColumnProps { export interface ColumnProps {
prefixCls: string; prefixCls: string;
@ -151,10 +152,10 @@ export default function Column({
)} )}
<div class={`${menuItemPrefixCls}-content`}>{label}</div> <div class={`${menuItemPrefixCls}-content`}>{label}</div>
{!isLoading && expandIcon && !isMergedLeaf && ( {!isLoading && expandIcon && !isMergedLeaf && (
<div class={`${menuItemPrefixCls}-expand-icon`}>{expandIcon}</div> <div class={`${menuItemPrefixCls}-expand-icon`}>{cloneVNode(expandIcon)}</div>
)} )}
{isLoading && loadingIcon && ( {isLoading && loadingIcon && (
<div class={`${menuItemPrefixCls}-loading-icon`}>{loadingIcon}</div> <div class={`${menuItemPrefixCls}-loading-icon`}>{cloneVNode(loadingIcon)}</div>
)} )}
</li> </li>
); );

@ -1,4 +1,4 @@
import type { FunctionalComponent, PropType } from 'vue'; import { cloneVNode, type FunctionalComponent, type PropType } from 'vue';
import type { MouseEventHandler } from '../_util/EventInterface'; import type { MouseEventHandler } from '../_util/EventInterface';
import type { VueNode } from '../_util/type'; import type { VueNode } from '../_util/type';
import PropTypes from '../_util/vue-types'; import PropTypes from '../_util/vue-types';
@ -23,7 +23,7 @@ const TransBtn: TransBtnType = (props, { slots }) => {
if (typeof customizeIcon === 'function') { if (typeof customizeIcon === 'function') {
icon = customizeIcon(customizeIconProps); icon = customizeIcon(customizeIconProps);
} else { } else {
icon = customizeIcon; icon = cloneVNode(customizeIcon);
} }
return ( return (

Loading…
Cancel
Save