Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions components/vc-cascader/OptionList/Column.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import type { DefaultOptionType, SingleValueType } from '../Cascader';
import { SEARCH_MARK } from '../hooks/useSearchOptions';
import type { Key } from '../../_util/type';
import { useInjectCascader } from '../context';
import { cloneVNode } from 'vue';
export const FIX_LABEL = '__cascader_fix_label__';
export interface ColumnProps {
prefixCls: string;
Expand Down Expand Up @@ -151,10 +152,10 @@ export default function Column({
)}
<div class={`${menuItemPrefixCls}-content`}>{label}</div>
{!isLoading && expandIcon && !isMergedLeaf && (
<div class={`${menuItemPrefixCls}-expand-icon`}>{expandIcon}</div>
<div class={`${menuItemPrefixCls}-expand-icon`}>{cloneVNode(expandIcon)}</div>
)}
{isLoading && loadingIcon && (
<div class={`${menuItemPrefixCls}-loading-icon`}>{loadingIcon}</div>
<div class={`${menuItemPrefixCls}-loading-icon`}>{cloneVNode(loadingIcon)}</div>
)}
</li>
);
Expand Down
4 changes: 2 additions & 2 deletions components/vc-select/TransBtn.tsx
Original file line number Diff line number Diff line change
@@ -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 { VueNode } from '../_util/type';
import PropTypes from '../_util/vue-types';
Expand All @@ -23,7 +23,7 @@ const TransBtn: TransBtnType = (props, { slots }) => {
if (typeof customizeIcon === 'function') {
icon = customizeIcon(customizeIconProps);
} else {
icon = customizeIcon;
icon = cloneVNode(customizeIcon);
}

return (
Expand Down
Loading