Skip to content

Commit da26f02

Browse files
authored
Merge pull request #784 from actiontech/fix/issue-3193
[fix](SqlExecWorkflow): Fix the error of switching pages
2 parents 484ba11 + 75cd221 commit da26f02

File tree

1 file changed

+5
-2
lines changed
  • packages/sqle/src/page/SqlExecWorkflow/Detail/components/AuditExecResultPanel/RetryExecuteModal

1 file changed

+5
-2
lines changed

packages/sqle/src/page/SqlExecWorkflow/Detail/components/AuditExecResultPanel/RetryExecuteModal/index.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ const RetryExecuteModal = () => {
136136
};
137137

138138
useEffect(() => {
139-
if (pageIndex && pageSize && visible) {
139+
if (visible && pageIndex && pageSize) {
140140
tableChange(
141141
{
142142
current: pageIndex,
@@ -150,12 +150,15 @@ const RetryExecuteModal = () => {
150150
}
151151
);
152152
}
153+
// eslint-disable-next-line react-hooks/exhaustive-deps
154+
}, [visible, pageIndex, pageSize]);
153155

156+
useEffect(() => {
154157
if (execSqlId && !allSelectedKeys.length && visible) {
155158
setAllSelectedKeys([execSqlId]);
156159
}
157160
// eslint-disable-next-line react-hooks/exhaustive-deps
158-
}, [pageIndex, pageSize, visible, tableChange, execSqlId]);
161+
}, [visible, execSqlId]);
159162

160163
const handleRetryExecute = () => {
161164
if (!allSelectedKeys.length) {

0 commit comments

Comments
 (0)