修复 curd filter 数据不同步到子组件的问题

This commit is contained in:
2betop 2020-06-15 14:36:06 +08:00
parent acdad67ca7
commit 8837f92138
4 changed files with 13 additions and 4 deletions

View File

@ -799,6 +799,7 @@ export function HocStoreFactory(renderer: {
props.data.__super,
false
)) &&
// nextProps.data.__super !== props.data.__super) &&
store.initData(
createObject(nextProps.data.__super, {
...nextProps.data,

View File

@ -434,6 +434,7 @@ export class CardItemFieldRenderer extends TableCell {
render() {
let {
type,
className,
render,
style,

View File

@ -9,7 +9,13 @@ import {
import {iRendererStore} from './iRenderer';
import isEqual from 'lodash/isEqual';
import find from 'lodash/find';
import {createObject, isObject, guid, immutableExtends} from '../utils/helper';
import {
createObject,
isObject,
guid,
immutableExtends,
extendObject
} from '../utils/helper';
import {evalExpression} from '../utils/tpl';
export const Item = types
@ -41,7 +47,7 @@ export const Item = types
get locals(): any {
return createObject(
createObject((getParent(self, 2) as IListStore).data, {
extendObject((getParent(self, 2) as IListStore).data, {
index: self.index
}),
self.data

View File

@ -22,7 +22,8 @@ import {
flattenTree,
eachTree,
difference,
immutableExtends
immutableExtends,
extendObject
} from '../utils/helper';
import {evalExpression} from '../utils/tpl';
@ -128,7 +129,7 @@ export const Row = types
get locals(): any {
return createObject(
createObject((getParent(self, self.depth * 2) as ITableStore).data, {
extendObject((getParent(self, self.depth * 2) as ITableStore).data, {
index: self.index
}),
self.data