react-aria-modal
Advanced tools
Comparing version 2.12.0 to 2.12.1
# Changelog | ||
## 2.12.1 | ||
- Fix bug that was blocking changes to the `scrollDisabled` prop *while the modal is open*. | ||
## 2.12.0 | ||
@@ -4,0 +8,0 @@ |
@@ -53,6 +53,2 @@ 'use strict'; | ||
} | ||
if (this.props.scrollDisabled) { | ||
noScroll.on(); | ||
} | ||
} | ||
@@ -78,4 +74,17 @@ }, { | ||
} | ||
if (this.props.scrollDisabled) { | ||
noScroll.on(); | ||
} | ||
} | ||
}, { | ||
key: 'componentDidUpdate', | ||
value: function componentDidUpdate(prevProps) { | ||
if (prevProps.scrollDisabled && !this.props.scrollDisabled) { | ||
noScroll.off(); | ||
} else if (!prevProps.scrollDisabled && this.props.scrollDisabled) { | ||
noScroll.on(); | ||
} | ||
} | ||
}, { | ||
key: 'componentWillUnmount', | ||
@@ -82,0 +91,0 @@ value: function componentWillUnmount() { |
{ | ||
"name": "react-aria-modal", | ||
"version": "2.12.0", | ||
"version": "2.12.1", | ||
"description": "A fully accessible and flexible React modal built according WAI-ARIA Authoring Practices", | ||
@@ -5,0 +5,0 @@ "main": "dist/react-aria-modal.js", |
@@ -24,6 +24,2 @@ const React = require('react'); | ||
} | ||
if (this.props.scrollDisabled) { | ||
noScroll.on(); | ||
} | ||
} | ||
@@ -48,4 +44,16 @@ | ||
} | ||
if (this.props.scrollDisabled) { | ||
noScroll.on(); | ||
} | ||
} | ||
componentDidUpdate(prevProps) { | ||
if (prevProps.scrollDisabled && !this.props.scrollDisabled) { | ||
noScroll.off(); | ||
} else if (!prevProps.scrollDisabled && this.props.scrollDisabled) { | ||
noScroll.on(); | ||
} | ||
} | ||
componentWillUnmount() { | ||
@@ -52,0 +60,0 @@ if (this.props.scrollDisabled) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
173821
411