Skip to content

Commit

Permalink
Merge pull request #11579 from thinkingc/feat-issue#11535
Browse files Browse the repository at this point in the history
fix: #11535 crud的source切换后分页失效问题修复
  • Loading branch information
hsm-lv authored Feb 14, 2025
2 parents fa256f0 + d3acfe6 commit 9aa8e13
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions packages/amis/src/renderers/Table/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -730,16 +730,17 @@ export default class Table<
let updateRows = false;

// 要严格比较前后的value值,否则某些情况下会导致循环update无限渲染
if (
Array.isArray(value) &&
(!prevProps ||
if (Array.isArray(value)) {
if (
!prevProps ||
!isEqual(
getPropValue(prevProps, (props: TableProps) => props.items),
value
))
) {
updateRows = true;
rows = value;
)
) {
updateRows = true;
rows = value;
}
} else if (typeof source === 'string') {
const resolved = resolveVariableAndFilter(source, props.data, '| raw');
const prev = prevProps
Expand Down

0 comments on commit 9aa8e13

Please sign in to comment.