Skip to content

Commit

Permalink
Merge pull request #11151 from zhangtao07/master
Browse files Browse the repository at this point in the history
 折叠容器折叠异常 & table2数据更新问题
  • Loading branch information
zhangtao07 authored Nov 4, 2024
2 parents e53d6d0 + 65a2448 commit 05e6aa2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
3 changes: 1 addition & 2 deletions packages/amis/src/renderers/CollapseGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export class CollapseGroupRender extends React.Component<
collapseId: string | number,
collapsed: boolean
) {
const {dispatchEvent, onCollapse} = this.props;
const {dispatchEvent} = this.props;
const renderEvent = await dispatchEvent(
'change',
resolveEventData(this.props, {
Expand All @@ -90,7 +90,6 @@ export class CollapseGroupRender extends React.Component<
if (renderEvent?.prevented) {
return;
}
onCollapse?.(activeKeys, collapseId, collapsed);
}

render() {
Expand Down
2 changes: 0 additions & 2 deletions packages/amis/src/renderers/Form/FieldSet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,6 @@ export default class FieldSetControl extends React.Component<
} = this.props;

let props: any = {
store,
data: store?.data,
render,
disabled,
formMode: subFormMode || formMode,
Expand Down
8 changes: 6 additions & 2 deletions packages/amis/src/renderers/Table2/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1304,7 +1304,7 @@ export default class Table2 extends React.Component<Table2Props, object> {
{
data: {
...this.props.data,
record,
...record,
rowIndex
}
}
Expand Down Expand Up @@ -1580,7 +1580,11 @@ export default class Table2 extends React.Component<Table2Props, object> {
dispatchEvent
} = this.props;
actions = Array.isArray(actions) ? actions.concat() : [];
const config = isObject(columnsTogglable) ? columnsTogglable : {};
const config = isObject(columnsTogglable)
? columnsTogglable
: {
align: 'left'
};

// 现在默认从crud里传进来的columnsTogglable是boolean类型
// table单独配置的是SchemaNode类型
Expand Down

0 comments on commit 05e6aa2

Please sign in to comment.