Skip to content

Commit

Permalink
fix: 修复modal footer的actions数量为奇数时, onFooterLayout 死循环调用导致整个footer会不停地…
Browse files Browse the repository at this point in the history
…上下抖动的问题 (ant-design#660) fixes: ant-design#559
  • Loading branch information
chenqi777 authored and BANG88 committed Oct 11, 2019
1 parent 5c00694 commit 06f47ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class AntmModal extends React.Component<ModalProps, any> {
onFooterLayout = (e: LayoutChangeEvent) => {
if (this.root) {
this.root.setNativeProps({
style: [{ paddingBottom: e.nativeEvent.layout.height }, maxHeight],
style: [{ paddingBottom: parseInt(String(e.nativeEvent.layout.height), 10) }, maxHeight],
});
}
};
Expand Down

0 comments on commit 06f47ce

Please sign in to comment.