Skip to content

Commit f89406f

Browse files
committed
refactor: rename visible to open in SelectTrigger and BaseSelect components
1 parent 323c48f commit f89406f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/BaseSelect/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,7 @@ const BaseSelect = React.forwardRef<BaseSelectRef, BaseSelectProps>((props, ref)
794794
ref={triggerRef}
795795
disabled={disabled}
796796
prefixCls={prefixCls}
797-
visible={triggerOpen}
797+
open={triggerOpen}
798798
popupElement={optionList}
799799
animation={animation}
800800
transitionName={transitionName}

src/SelectTrigger.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export interface SelectTriggerProps {
5757
prefixCls: string;
5858
children: React.ReactElement;
5959
disabled: boolean;
60-
visible: boolean;
60+
open: boolean;
6161
popupElement: React.ReactElement;
6262

6363
animation?: string;
@@ -74,7 +74,7 @@ export interface SelectTriggerProps {
7474
empty: boolean;
7575

7676
getTriggerDOMNode: (node: HTMLElement) => HTMLElement;
77-
onOpenChange?: (visible: boolean) => void;
77+
onOpenChange?: (open: boolean) => void;
7878

7979
onPopupMouseEnter: () => void;
8080
}
@@ -86,7 +86,7 @@ const SelectTrigger: React.ForwardRefRenderFunction<RefTriggerProps, SelectTrigg
8686
const {
8787
prefixCls,
8888
disabled,
89-
visible,
89+
open,
9090
children,
9191
popupElement,
9292
animation,
@@ -168,7 +168,7 @@ const SelectTrigger: React.ForwardRefRenderFunction<RefTriggerProps, SelectTrigg
168168
ref={triggerPopupRef}
169169
stretch={stretch}
170170
popupAlign={popupAlign}
171-
popupVisible={visible}
171+
popupVisible={open}
172172
getPopupContainer={getPopupContainer}
173173
popupClassName={classNames(popupClassName, {
174174
[`${popupPrefixCls}-empty`]: empty,

0 commit comments

Comments
 (0)