Browse Source

Pull request #3735: BI-143833 fix: 全选时数据变化,点击确定组件不会刷新

Merge in VISUAL/fineui from ~JIMMY.CHAI/fineui:master to master

* commit '3192129ee787dddc00bef4dc5a3b4b8a80a7ff30':
  BI-143833 fix: 全选时数据变化,点击确定组件不会刷新
  BI-143833 fix: 全选时数据变化,点击确定组件不会刷新
research/test
Jimmy.Chai-柴嘉明 10 months ago
parent
commit
62bc5c7d80
  1. 17
      packages/fineui/src/widget/multiselect/multiselect.insert.combo.js

17
packages/fineui/src/widget/multiselect/multiselect.insert.combo.js

@ -31,7 +31,8 @@ import {
pushDistinct,
Selection,
SIZE_CONSANTS,
BlankSplitChar
BlankSplitChar,
size,
} from "@/core";
import { Single, Combo, Msg } from "@/base";
import { MultiSelectBar, TriggerIconButton } from "@/case";
@ -215,7 +216,19 @@ export class MultiSelectInsertCombo extends Single {
},
}
],
itemsCreator: o.itemsCreator,
itemsCreator: (op, callback) => {
o.itemsCreator(op, ob => {
callback(ob);
// 全选时数据变化,配置需要同步
if (op.times === 1 &&this.storeValue.type === Selection.All && size(ob.items) !== size(this.storeValue.assist)) {
this._dataChange = true;
this.storeValue.assist = map(ob.items, 'value');
this._adjust(() => {
assertShowValue();
});
}
});
},
valueFormatter: o.valueFormatter,
itemFormatter: o.itemFormatter,
itemHeight: o.itemHeight,

Loading…
Cancel
Save