react-toastr
Advanced tools
Comparing version 2.9.1 to 2.9.2
@@ -5,2 +5,12 @@ # Change Log | ||
<a name="2.9.2"></a> | ||
## [2.9.2](https://github.com/tomchentw/react-toastr/compare/v2.9.1...v2.9.2) (2017-08-21) | ||
### Bug Fixes | ||
* **ToastContainer:** replace _.omit with object rest ([bc1a397](https://github.com/tomchentw/react-toastr/commit/bc1a397)), closes [#105](https://github.com/tomchentw/react-toastr/issues/105) [#104](https://github.com/tomchentw/react-toastr/issues/104) | ||
<a name="2.9.1"></a> | ||
@@ -7,0 +17,0 @@ ## [2.9.1](https://github.com/tomchentw/react-toastr/compare/v2.9.0...v2.9.1) (2017-08-21) |
@@ -1,2 +0,1 @@ | ||
import _omit from "lodash/omit"; | ||
import _includes from "lodash/includes"; | ||
@@ -6,2 +5,4 @@ | ||
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
@@ -146,7 +147,12 @@ | ||
var divProps = _omit(this.props, ["toastType", "toastMessageFactory", "preventDuplicates", "newestOnTop"]); | ||
var _props = this.props, | ||
toastType = _props.toastType, | ||
toastMessageFactory = _props.toastMessageFactory, | ||
preventDuplicates = _props.preventDuplicates, | ||
newestOnTop = _props.newestOnTop, | ||
restProps = _objectWithoutProperties(_props, ["toastType", "toastMessageFactory", "preventDuplicates", "newestOnTop"]); | ||
return React.createElement( | ||
"div", | ||
Object.assign({}, divProps, { "aria-live": "polite", role: "alert" }), | ||
Object.assign({}, restProps, { "aria-live": "polite", role: "alert" }), | ||
this.state.toasts.map(function (toast) { | ||
@@ -153,0 +159,0 @@ return _this5.props.toastMessageFactory(toast); |
{ | ||
"name": "react-toastr", | ||
"version": "2.9.1", | ||
"version": "2.9.2", | ||
"description": "React.js toastr component", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -142,7 +142,6 @@ import _ from "lodash"; | ||
render() { | ||
const divProps = _.omit(this.props, [`toastType`, `toastMessageFactory`, `preventDuplicates`, | ||
`newestOnTop`]); | ||
const {toastType, toastMessageFactory, preventDuplicates, newestOnTop, ...restProps} = this.props; | ||
return ( | ||
<div {...divProps} aria-live="polite" role="alert"> | ||
<div {...restProps} aria-live="polite" role="alert"> | ||
{this.state.toasts.map(toast => this.props.toastMessageFactory(toast))} | ||
@@ -149,0 +148,0 @@ </div> |
65493
1307