@xh/hoist 52.0.1 → 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 +7 -0
- package/cmp/form/field/BaseFieldModel.js +6 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -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
|
//-------------------------
|