|
...
|
...
|
@@ -188,38 +188,42 @@ var ExtendedWidget = function ExtendedWidget(_ref) { |
|
188
|
188
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
189
|
189
|
className: "fr-item-wrapper"
|
|
190
|
190
|
}, /*#__PURE__*/_react.default.createElement(Widget, finalProps)));
|
|
191
|
|
-}; // const areEqual = (prev, current) => {
|
|
192
|
|
-// if (prev.schema && current.schema) {
|
|
193
|
|
-// if (prev.schema.$id === '#') {
|
|
194
|
|
-// return false;
|
|
195
|
|
-// }
|
|
196
|
|
-// if (prev.schema.hidden && current.schema.hidden) {
|
|
197
|
|
-// return true;
|
|
198
|
|
-// }
|
|
199
|
|
-// }
|
|
200
|
|
-// if (prev.readOnly !== current.readOnly) {
|
|
201
|
|
-// return false;
|
|
202
|
|
-// }
|
|
203
|
|
-// if (prev.disabled !== current.disabled) {
|
|
204
|
|
-// return false;
|
|
205
|
|
-// }
|
|
206
|
|
-// if (
|
|
207
|
|
-// JSON.stringify(prev.dependValues) !== JSON.stringify(current.dependValues)
|
|
208
|
|
-// ) {
|
|
209
|
|
-// return false;
|
|
210
|
|
-// }
|
|
211
|
|
-// if (isObjType(prev.schema) && isObjType(current.schema)) {
|
|
212
|
|
-// return false;
|
|
213
|
|
-// }
|
|
214
|
|
-// if (
|
|
215
|
|
-// JSON.stringify(prev.value) === JSON.stringify(current.value) &&
|
|
216
|
|
-// JSON.stringify(prev.schema) === JSON.stringify(current.schema)
|
|
217
|
|
-// ) {
|
|
218
|
|
-// return true;
|
|
219
|
|
-// }
|
|
220
|
|
-// return false;
|
|
221
|
|
-// };
|
|
222
|
|
-
|
|
223
|
|
-
|
|
224
|
|
-var _default = ExtendedWidget;
|
|
|
191
|
+};
|
|
|
192
|
+
|
|
|
193
|
+var areEqual = function areEqual(prev, current) {
|
|
|
194
|
+ if (prev.schema && current.schema) {
|
|
|
195
|
+ if (prev.schema.$id === '#') {
|
|
|
196
|
+ return false;
|
|
|
197
|
+ }
|
|
|
198
|
+
|
|
|
199
|
+ if (prev.schema.hidden && current.schema.hidden) {
|
|
|
200
|
+ return true;
|
|
|
201
|
+ }
|
|
|
202
|
+ }
|
|
|
203
|
+
|
|
|
204
|
+ if (prev.readOnly !== current.readOnly) {
|
|
|
205
|
+ return false;
|
|
|
206
|
+ }
|
|
|
207
|
+
|
|
|
208
|
+ if (prev.disabled !== current.disabled) {
|
|
|
209
|
+ return false;
|
|
|
210
|
+ }
|
|
|
211
|
+
|
|
|
212
|
+ if (JSON.stringify(prev.dependValues) !== JSON.stringify(current.dependValues)) {
|
|
|
213
|
+ return false;
|
|
|
214
|
+ }
|
|
|
215
|
+
|
|
|
216
|
+ if ((0, _utils.isObjType)(prev.schema) && (0, _utils.isObjType)(current.schema)) {
|
|
|
217
|
+ return false;
|
|
|
218
|
+ }
|
|
|
219
|
+
|
|
|
220
|
+ if (JSON.stringify(prev.value) === JSON.stringify(current.value) && JSON.stringify(prev.schema) === JSON.stringify(current.schema)) {
|
|
|
221
|
+ return true;
|
|
|
222
|
+ }
|
|
|
223
|
+
|
|
|
224
|
+ return false;
|
|
|
225
|
+};
|
|
|
226
|
+
|
|
|
227
|
+var _default = /*#__PURE__*/_react.default.memo(ExtendedWidget, areEqual);
|
|
|
228
|
+
|
|
225
|
229
|
exports.default = _default; |
|
|
\ No newline at end of file |
...
|
...
|
|