Skip to content

Commit

Permalink
fix(select): 修复 select overlayClassName 丢失的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
insekkei committed Mar 25, 2022
1 parent 986024d commit bfe85b0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/select/base/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ const Select = forwardRefWithStatics(

const [value, onChange] = useDefault(props.value, props.defaultValue, props.onChange);
const { classPrefix } = useConfig();
const { overlayClassName, ...restPopupProps } = popupProps || {};

const name = `${classPrefix}-select`; // t-select

Expand Down Expand Up @@ -349,8 +350,8 @@ const Select = forwardRefWithStatics(
minCollapsedNum={minCollapsedNum}
collapsedItems={renderCollapsedItems}
popupProps={{
overlayClassName: [`${name}__dropdown`, ['narrow-scrollbar']],
...popupProps,
overlayClassName: [`${name}__dropdown`, ['narrow-scrollbar'], overlayClassName],
...restPopupProps,
}}
popupVisible={showPopup}
onPopupVisibleChange={onPopupVisibleChange || handleShowPopup}
Expand Down

0 comments on commit bfe85b0

Please sign in to comment.