Skip to content

Commit c110551

Browse files
committed
minor modal scroll fix and Lookup demo position
1 parent abe4ee7 commit c110551

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

components/SLDSModal/index.jsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ module.exports = React.createClass( {
8585

8686
updateBodyScroll () {
8787
if(window && document && document.body){
88-
if(!this.state.isClosing){
88+
if(this.props.isOpen){
8989
document.body.style.overflow = 'hidden';
9090
}
9191
else{
@@ -137,9 +137,13 @@ module.exports = React.createClass( {
137137

138138
componentDidUpdate (prevProps, prevState) {
139139

140-
if(this.state.isClosing !== prevState.isClosing){
141140

141+
if(this.props.isOpen !== prevProps.isOpen){
142142
this.updateBodyScroll();
143+
}
144+
145+
if(this.state.isClosing !== prevState.isClosing){
146+
143147

144148

145149
if(this.state.isClosing){

demo/pages/HomePage/index.jsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,15 @@ module.exports = React.createClass( {
5959
<main className='stage-main slds-grid slds-wrap slds-grow' role='main'>
6060
<div className='region region--main slds-grow slds-size--1-of-1 slds-medium-size--1-of-2 slds-large-size--8-of-12 slds-col-rule--right slds-p-around--large'>
6161

62-
<LookupBaseSection />
63-
6462
<ButtonSection />
6563

6664
<PicklistBaseSection />
6765

6866
<ModalSection />
6967

70-
<DatePickerSingleSelectSection />
68+
<LookupBaseSection />
7169

70+
<DatePickerSingleSelectSection />
7271

7372

7473
{/*

0 commit comments

Comments
 (0)