This is an automated email from the ASF dual-hosted git repository.

mintsweet pushed a commit to branch release-v1.0
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/release-v1.0 by this push:
     new acb9590e4 fix: error current page when deleting the last data scope 
(#7602) (#7605)
acb9590e4 is described below

commit acb9590e451a11f9ebb0d96bab1fdd554aae88c5
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Tue Jun 11 14:48:43 2024 +1200

    fix: error current page when deleting the last data scope (#7602) (#7605)
    
    Co-authored-by: 青湛 <[email protected]>
---
 config-ui/src/routes/connection/connection.tsx | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/config-ui/src/routes/connection/connection.tsx 
b/config-ui/src/routes/connection/connection.tsx
index d2d81e623..213061519 100644
--- a/config-ui/src/routes/connection/connection.tsx
+++ b/config-ui/src/routes/connection/connection.tsx
@@ -182,7 +182,11 @@ export const Connection = () => {
     );
 
     if (res.status === 'success') {
-      setVersion((v) => v + 1);
+      if (dataSource.length === 1) {
+        setPage(page - 1);
+      } else {
+        setVersion((v) => v + 1);
+      }
       message.success(onlyData ? 'Clear historical data successful.' : 'Delete 
Data Scope successful.');
       handleHideDialog();
     } else if (res.status === 'conflict') {

Reply via email to