react-progress-button-for-images-uploader
Advanced tools
Comparing version 5.1.1 to 5.1.2
@@ -118,30 +118,2 @@ 'use strict'; | ||
_createClass(ProgressButton, [{ | ||
key: 'getDerivedStateFromProps', | ||
value: function getDerivedStateFromProps(nextProps, state) { | ||
if (nextProps.state === state.prevState) { | ||
return; | ||
} | ||
var prevState = state.prevState; | ||
switch (nextProps.state) { | ||
case STATE.SUCCESS: | ||
this.success(); | ||
return; | ||
case STATE.ERROR: | ||
this.error(); | ||
return; | ||
case STATE.LOADING: | ||
this.loading(); | ||
return; | ||
case STATE.DISABLED: | ||
this.disable(); | ||
return; | ||
case STATE.NOTHING: | ||
this.notLoading(); | ||
return; | ||
default: | ||
return; | ||
} | ||
} | ||
}, { | ||
key: 'componentWillUnmount', | ||
@@ -204,2 +176,30 @@ value: function componentWillUnmount() { | ||
} | ||
}], [{ | ||
key: 'getDerivedStateFromProps', | ||
value: function getDerivedStateFromProps(nextProps, state) { | ||
if (nextProps.state === state.prevState) { | ||
return; | ||
} | ||
var prevState = state.prevState; | ||
switch (nextProps.state) { | ||
case STATE.SUCCESS: | ||
this.success(); | ||
return; | ||
case STATE.ERROR: | ||
this.error(); | ||
return; | ||
case STATE.LOADING: | ||
this.loading(); | ||
return; | ||
case STATE.DISABLED: | ||
this.disable(); | ||
return; | ||
case STATE.NOTHING: | ||
this.notLoading(); | ||
return; | ||
default: | ||
return; | ||
} | ||
} | ||
}]); | ||
@@ -206,0 +206,0 @@ |
{ | ||
"name": "react-progress-button-for-images-uploader", | ||
"version": "5.1.1", | ||
"version": "5.1.2", | ||
"description": "Simple react.js component for a inline progress indicator", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -40,3 +40,3 @@ import React, { Component } from 'react' | ||
getDerivedStateFromProps(nextProps, state) { | ||
static getDerivedStateFromProps(nextProps, state) { | ||
if (nextProps.state === state.prevState) { return } | ||
@@ -43,0 +43,0 @@ const { prevState } = state |
22083