From a987504d17a7279dd77f953b2b62890ab890647b Mon Sep 17 00:00:00 2001 From: sunhao Date: Thu, 29 Aug 2024 15:24:46 +0800 Subject: [PATCH] * picker: add caretClass option to picker. --- lib/picker/src/component/picker-multi-select.tsx | 4 ++-- lib/picker/src/component/picker-single-select.tsx | 4 ++-- lib/picker/src/component/picker.tsx | 1 + lib/picker/src/types/picker-options.ts | 3 ++- lib/picker/src/types/picker-select-props.ts | 3 ++- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/picker/src/component/picker-multi-select.tsx b/lib/picker/src/component/picker-multi-select.tsx index e31571f990..13c6cbd7a8 100644 --- a/lib/picker/src/component/picker-multi-select.tsx +++ b/lib/picker/src/component/picker-multi-select.tsx @@ -66,7 +66,7 @@ export class PickerMultiSelect extends PickTrigger, + , ]; } diff --git a/lib/picker/src/component/picker-single-select.tsx b/lib/picker/src/component/picker-single-select.tsx index d8d2205370..89562bd1c4 100644 --- a/lib/picker/src/component/picker-single-select.tsx +++ b/lib/picker/src/component/picker-single-select.tsx @@ -67,7 +67,7 @@ export class PickerSingleSelect extends PickTrigger ) : null; - const caret = showSearch ? null : ; + const caret = showSearch ? null : ; return [ view, children, diff --git a/lib/picker/src/component/picker.tsx b/lib/picker/src/component/picker.tsx index f15d2336fa..63bbaba19c 100644 --- a/lib/picker/src/component/picker.tsx +++ b/lib/picker/src/component/picker.tsx @@ -317,6 +317,7 @@ export class Picker extends Pick search?: boolean | number; searchHint?: string; hotkeys?: HotkeysSettings; + caretClass?: ClassNameLike; onDeselect?: (values: string | string[]) => false | void; onSelect?: (values: string | string[]) => false | void; diff --git a/lib/picker/src/types/picker-select-props.ts b/lib/picker/src/types/picker-select-props.ts index 62a5fd267f..c9c37ca146 100644 --- a/lib/picker/src/types/picker-select-props.ts +++ b/lib/picker/src/types/picker-select-props.ts @@ -1,6 +1,6 @@ import type {PickTriggerProps} from '@zui/pick'; import type {PickerState} from './picker-state'; -import type {HotkeysSettings, CustomContentType} from '@zui/core'; +import type {HotkeysSettings, CustomContentType, ClassNameLike} from '@zui/core'; import type {PickerItemBasic} from './picker-item-options'; export interface PickerSelectProps extends PickTriggerProps { @@ -14,6 +14,7 @@ export interface PickerSelectProps extends emptyValue: string; hotkeys?: HotkeysSettings; display?: string | ((values: string | string[], selections: PickerItemBasic[]) => CustomContentType); + caretClass?: ClassNameLike; onSelect: (values: string | string[]) => void; onDeselect: (values: string | string[]) => void;