File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "node" : true ,
3+ "browser" : true ,
4+ "esnext" : true ,
5+ "laxcomma" : true
6+ }
Original file line number Diff line number Diff line change @@ -12,14 +12,20 @@ var LazyInput = React.createClass({
1212 return {
1313 type : 'text' ,
1414 lazyLevel : 1000
15- }
15+ } ;
1616 } ,
1717 getInitialState : function ( ) {
1818 return { value : this . props . value } ;
1919 } ,
2020 componentWillReceiveProps : function ( nextProps ) {
2121 this . updateIfNotLazy ( nextProps . value ) ;
2222 } ,
23+ componentWillUnmount : function ( ) {
24+ if ( this . procrastinationTimer ) {
25+ clearTimeout ( this . procrastinationTimer ) ;
26+ this . procrastinating = false ;
27+ }
28+ } ,
2329 updateIfNotLazy : function ( newValue ) {
2430 if ( ! this . procrastinating ) {
2531 this . setState ( { value : newValue , requestedValue : undefined } ) ;
You can’t perform that action at this time.
0 commit comments