Skip to content
This repository was archived by the owner on Aug 23, 2022. It is now read-only.

Commit 488eb9e

Browse files
committed
Also fixing some broken lint tests
1 parent ce4a255 commit 488eb9e

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

src/components/control-component-factory.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff 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,

src/components/form-component.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff 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);

0 commit comments

Comments
 (0)