From 6db1abfdc7dd41c03a59d78ec104bc7ba0901918 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Met=C3=A1l=20=C3=81d=C3=A1m?= Date: Mon, 20 Mar 2017 12:44:01 +0100 Subject: [PATCH 1/2] Fixed getStyle Added display: 'block' to getStyle. --- src/Modal.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Modal.js b/src/Modal.js index db56e0b..c4c8392 100644 --- a/src/Modal.js +++ b/src/Modal.js @@ -255,7 +255,8 @@ class Modal extends React.Component { dialog: { zIndex: getZIndex('modal'), paddingRight: bodyIsOverflowing && !modalIsOverflowing ? scrollbarWidth() : void 0, - paddingLeft: !bodyIsOverflowing && modalIsOverflowing ? scrollbarWidth() : void 0 + paddingLeft: !bodyIsOverflowing && modalIsOverflowing ? scrollbarWidth() : void 0, + display: 'block' }, backdrop: { zIndex: getZIndex('backdrop') From 3ce9af47edc4ffb523672a49ef63a31afeace358 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Met=C3=A1l=20=C3=81d=C3=A1m?= Date: Mon, 20 Mar 2017 12:44:13 +0100 Subject: [PATCH 2/2] Fixed use example --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1d7b321..37b6162 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,10 @@ __note__: React bootstrap modal is compatible with bootstrap __3.3.4+__ if you w var Modal = require('react-bootstrap-modal') class ModalExample extends React.Component { + constructor(props) { + super(props) + this.state = { open: false } + } render(){ let closeModal = () => this.setState({ open: false }) @@ -29,7 +33,7 @@ class ModalExample extends React.Component { return (
- +