@xh/hoist 52.0.0 → 52.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -1
- package/cmp/form/field/BaseFieldModel.js +6 -6
- package/data/Store.js +1 -0
- package/data/cube/Cube.js +1 -0
- package/data/cube/View.js +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## v52.0.
|
|
3
|
+
## v52.0.2 - 2022-10-13
|
|
4
|
+
|
|
5
|
+
### 🐞 Bug Fixes
|
|
6
|
+
|
|
7
|
+
* Form field dirty checking now uses lodash `isEqual` to compare initial and current values,
|
|
8
|
+
avoiding false positives with Array values.
|
|
9
|
+
|
|
10
|
+
## v52.0.1 - 2022-10-10
|
|
4
11
|
|
|
5
12
|
### 🎁 New Features
|
|
6
13
|
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Copyright © 2022 Extremely Heavy Industries Inc.
|
|
6
6
|
*/
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {action, computed, observable, runInAction
|
|
7
|
+
import {HoistModel, managed, TaskObserver} from '@xh/hoist/core';
|
|
8
|
+
import {genDisplayName, required, Rule, ValidationState} from '@xh/hoist/data';
|
|
9
|
+
import {action, computed, makeObservable, observable, runInAction} from '@xh/hoist/mobx';
|
|
10
10
|
import {wait} from '@xh/hoist/promise';
|
|
11
|
-
import {
|
|
12
|
-
import {compact, flatten, isEmpty, isFunction, isNil} from 'lodash';
|
|
11
|
+
import {executeIfFunction, withDefault} from '@xh/hoist/utils/js';
|
|
13
12
|
import {createObservableRef} from '@xh/hoist/utils/react';
|
|
13
|
+
import {compact, flatten, isEmpty, isEqual, isFunction, isNil} from 'lodash';
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Abstract Base class for FieldModels.
|
|
@@ -210,7 +210,7 @@ export class BaseFieldModel extends HoistModel {
|
|
|
210
210
|
|
|
211
211
|
/** @member {boolean} - true if value has been changed since last reset/init. */
|
|
212
212
|
get isDirty() {
|
|
213
|
-
return this.value
|
|
213
|
+
return !isEqual(this.value, this.initialValue);
|
|
214
214
|
}
|
|
215
215
|
|
|
216
216
|
//-------------------------
|
package/data/Store.js
CHANGED
package/data/cube/Cube.js
CHANGED
package/data/cube/View.js
CHANGED