Skip to content

Commit 2f7add3

Browse files
committed
feat: Store current field's value to the history
1 parent 89483e8 commit 2f7add3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

assets/components/modai/js/mgr/autosummary.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Ext.onReady(function() {
66
const cachedItem = this._cache[key];
77

88
cachedItem.els.forEach(({wrapper, field}) => {
9-
const prevValue = field.value;
9+
const prevValue = field.getValue();
1010
field.setValue(value);
1111
field.fireEvent('change', field, value, prevValue);
1212

@@ -35,6 +35,11 @@ Ext.onReady(function() {
3535
}
3636

3737
this._cache[key].els.push({ field, wrapper });
38+
const currentValue = field.getValue();
39+
if (currentValue) {
40+
this._cache[key].values = [currentValue];
41+
this._cache[key].visible = 0;
42+
}
3843
},
3944
store (key, value) {
4045
const cachedItem = this._cache[key];

0 commit comments

Comments
 (0)