Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

fix(Popup): filter out NaN values from Popper's styles #1365

Merged
merged 4 commits into from
May 21, 2019
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- Fixed handle refs on updates of `innerRef` prop in `Ref` component @layershifter ([#1331](https://github.com/stardust-ui/react/pull/1331))
- Fixed positioing of `Popup` in scrollable container @layershifter ([#1341](https://github.com/stardust-ui/react/pull/1341))
- Add Teams dark and hc themeing for `Dialog` [redlines] @codepretty ([#1297](https://github.com/stardust-ui/react/pull/1297))
- Remove `NaN` values from positioning styles in `Popup` @kuzhelov ([#1365](https://github.com/stardust-ui/react/pull/1365))

### Features
- Add `selected`, `isFromKeyboard` props to `DropdownItem` @mnajdova ([#1299](https://github.com/stardust-ui/react/pull/1299))
Expand Down
3 changes: 2 additions & 1 deletion packages/react/src/components/Popup/Popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -444,10 +444,11 @@ export default class Popup extends AutoControlledComponent<PopupProps, PopupStat
placement,
ref,
scheduleUpdate,
style: popupPlacementStyles,
style: popupPlacementStylesRaw,
}: PopperChildrenProps,
) => {
const { content: propsContent, renderContent, contentRef, mountDocument, pointing } = this.props
const popupPlacementStyles = _.omitBy(popupPlacementStylesRaw, _.isNaN)
const content = renderContent ? renderContent(scheduleUpdate) : propsContent
const documentRef = toRefObject(mountDocument)

Expand Down