This repository was archived by the owner on Aug 23, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +14
-12
lines changed Expand file tree Collapse file tree 2 files changed +14
-12
lines changed Original file line number Diff line number Diff line change @@ -157,12 +157,6 @@ function createControlClass(s) {
157157 this . handleLoad ( ) ;
158158 }
159159
160- UNSAFE_componentWillReceiveProps ( { modelValue } ) {
161- if ( modelValue !== this . props . modelValue ) {
162- this . setViewValue ( modelValue ) ;
163- }
164- }
165-
166160 shouldComponentUpdate ( nextProps , nextState ) {
167161 return ! shallowEqual ( this . props , nextProps , {
168162 deepKeys : [ 'controlProps' ] ,
@@ -388,6 +382,13 @@ function createControlClass(s) {
388382 return this . props . getValue ( event , this . props ) ;
389383 }
390384
385+ /* eslint-disable camelcase */
386+ UNSAFE_componentWillReceiveProps ( { modelValue } ) {
387+ if ( modelValue !== this . props . modelValue ) {
388+ this . setViewValue ( modelValue ) ;
389+ }
390+ }
391+
391392 handleIntents ( ) {
392393 const {
393394 model,
Original file line number Diff line number Diff line change @@ -101,12 +101,6 @@ function createFormClass(s = defaultStrategy) {
101101 clearGetFormCacheForModel ( this . props . model ) ;
102102 }
103103
104- UNSAFE_componentWillReceiveProps ( nextProps ) {
105- if ( containsEvent ( nextProps . validateOn , 'change' ) ) {
106- this . validate ( nextProps ) ;
107- }
108- }
109-
110104 shouldComponentUpdate ( nextProps , nextState ) {
111105 return deepCompareChildren ( this , nextProps , nextState ) ;
112106 }
@@ -123,6 +117,13 @@ function createFormClass(s = defaultStrategy) {
123117 }
124118 }
125119
120+ /* eslint-disable camelcase */
121+ UNSAFE_componentWillReceiveProps ( nextProps ) {
122+ if ( containsEvent ( nextProps . validateOn , 'change' ) ) {
123+ this . validate ( nextProps ) ;
124+ }
125+ }
126+
126127 handleUpdate ( ) {
127128 if ( this . props . onUpdate ) {
128129 this . props . onUpdate ( this . props . formValue ) ;
You can’t perform that action at this time.
0 commit comments