Skip to content

Commit

Permalink
fix(overlaytrigger): Fix the issue of invalid styles uiwjs#962
Browse files Browse the repository at this point in the history
  • Loading branch information
shenzhiqing committed May 5, 2023
1 parent 11fca0e commit ab44560
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/react-overlay-trigger/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -307,14 +307,15 @@ export default React.forwardRef<OverlayTriggerRef, OverlayTriggerProps>((props,
}
}
overlayProps.style = { ...overlayProps.style, ...overlayStyl };

return (
<React.Fragment>
{cloneElement(
child,
Object.assign({}, child.props, {
...triggerProps,
ref: triggerRef,
style: { zIndex: zIndex.current },
style: { ...child.props?.style, zIndex: zIndex.current },
className: [child.props.className, disabled ? `${prefixCls}-disabled` : null]
.filter(Boolean)
.join(' ')
Expand Down

0 comments on commit ab44560

Please sign in to comment.