Skip to content

Commit

Permalink
Issue #260 - Fix display footer on new list page
Browse files Browse the repository at this point in the history
  • Loading branch information
nsanta committed Sep 26, 2017
1 parent e112bcf commit 044a6a1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@ var AddToListButton = React.createClass({

toggleModal: function(e) {
e.preventDefault();
this.setState({ showModal: !this.state.showModal })
this.setState({ showModal: !this.state.showModal }, () =>{
if (this.state.showModal) {
$('body').addClass('no-scroll');
} else {
$('body').removeClass('no-scroll');
}
});
},

render: function() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ var AddToListForm = React.createClass({
this.setState({ listId: value });
},

componentWillUnmount: function() {
$('body').removeClass('no-scroll');
},

handleNote: function(e) {
this.setState({ note: e.target.value });
},
Expand Down
5 changes: 0 additions & 5 deletions app/assets/javascripts/components/autocomplete_select.js.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ var AutocompleteSelect = React.createClass({
componentDidMount: function() {
var _this = this;
var select = null;
$('body').addClass('no-scroll');

if (this.props.autocompletePath) {
select = $('#' + this.props.id).selectize({
Expand Down Expand Up @@ -58,10 +57,6 @@ var AutocompleteSelect = React.createClass({
}
},

componentWillUnmount: function() {
$('body').removeClass('no-scroll');
},

render: function() {
return (
<select name={this.props.name} id={this.props.id} aria-hidden="true">
Expand Down

0 comments on commit 044a6a1

Please sign in to comment.