You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/07/12 12:56:22 UTC

[GitHub] [dolphinscheduler] zhuxt2015 commented on a diff in pull request #10706: [Bug] [Api] Not refresh workflow list when batch delete workflow failed

zhuxt2015 commented on code in PR #10706:
URL: https://github.com/apache/dolphinscheduler/pull/10706#discussion_r918935890


##########
dolphinscheduler-ui/src/views/projects/workflow/definition/use-table.ts:
##########
@@ -257,6 +257,20 @@ export function useTable() {
         variables.page -= 1
       }
 
+      variables.checkedRowKeys = []
+      getTableData({
+        pageSize: variables.pageSize,
+        pageNo: variables.page,
+        searchVal: variables.searchVal
+      })
+    }).catch(() => {
+      if (
+          Math.ceil((variables.columns.length - variables.checkedRowKeys.length) / variables.pageSize) < variables.page
+          && variables.page > 1
+      ) {
+        variables.page -= 1;
+      }
+
       variables.checkedRowKeys = []

Review Comment:
   If delete some workflow in page 1 and all workflow of page 2,  and current page is 2,  after delete operation, current page will switch to page 1.  "columns length divide checkedRowKeys length" resolve this.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org