This is an automated email from the ASF dual-hosted git repository.
klesh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/main by this push:
new 896f09f5f bug-fix 8470 support added (#8475)
896f09f5f is described below
commit 896f09f5f623656dd43b754b3d2d165dde118d59
Author: Veet Moradiya <[email protected]>
AuthorDate: Mon Jun 23 08:52:24 2025 +0530
bug-fix 8470 support added (#8475)
---
config-ui/src/routes/api-keys/api-keys.tsx | 9 +++++++--
config-ui/src/routes/blueprint/home/index.tsx | 9 +++++++--
config-ui/src/routes/pipeline/pipelines.tsx | 9 +++++++--
config-ui/src/routes/project/home/index.tsx | 9 +++++++--
4 files changed, 28 insertions(+), 8 deletions(-)
diff --git a/config-ui/src/routes/api-keys/api-keys.tsx
b/config-ui/src/routes/api-keys/api-keys.tsx
index 78bba07d3..b16f7a979 100644
--- a/config-ui/src/routes/api-keys/api-keys.tsx
+++ b/config-ui/src/routes/api-keys/api-keys.tsx
@@ -33,7 +33,7 @@ import * as S from './styled';
export const ApiKeys = () => {
const [version, setVersion] = useState(1);
const [page, setPage] = useState(1);
- const [pageSize] = useState(20);
+ const [pageSize, setPageSize] = useState(20);
const [operating, setOperating] = useState(false);
const [modal, setModal] = useState<'create' | 'show' | 'delete'>();
const [currentId, setCurrentId] = useState<string>();
@@ -155,7 +155,12 @@ export const ApiKeys = () => {
current: page,
pageSize,
total,
- onChange: setPage,
+ onChange: ((newPage: number, newPageSize: number) => {
+ setPage(newPage);
+ if (newPageSize !== pageSize) {
+ setPageSize(newPageSize);
+ }
+ }) as (newPage: number) => void,
}}
/>
{modal === 'create' && (
diff --git a/config-ui/src/routes/blueprint/home/index.tsx
b/config-ui/src/routes/blueprint/home/index.tsx
index ae2a624b2..daa57c1d5 100644
--- a/config-ui/src/routes/blueprint/home/index.tsx
+++ b/config-ui/src/routes/blueprint/home/index.tsx
@@ -36,7 +36,7 @@ export const BlueprintHomePage = () => {
const [version, setVersion] = useState(1);
const [type, setType] = useState('all');
const [page, setPage] = useState(1);
- const [pageSize] = useState(20);
+ const [pageSize, setPageSize] = useState(20);
const [open, setOpen] = useState(false);
const [name, setName] = useState('');
const [mode, setMode] = useState(IBPMode.NORMAL);
@@ -212,7 +212,12 @@ export const BlueprintHomePage = () => {
current: page,
pageSize,
total,
- onChange: setPage,
+ onChange: ((newPage: number, newPageSize: number) => {
+ setPage(newPage);
+ if (newPageSize !== pageSize) {
+ setPageSize(newPageSize);
+ }
+ }) as (newPage: number) => void,
}}
/>
</Flex>
diff --git a/config-ui/src/routes/pipeline/pipelines.tsx
b/config-ui/src/routes/pipeline/pipelines.tsx
index 3eca563df..5f9c3cda6 100644
--- a/config-ui/src/routes/pipeline/pipelines.tsx
+++ b/config-ui/src/routes/pipeline/pipelines.tsx
@@ -26,7 +26,7 @@ import { PipelineTable } from './components';
export const Pipelines = () => {
const [page, setPage] = useState(1);
- const [pageSize] = useState(20);
+ const [pageSize, setPageSize] = useState(20);
const { ready, data } = useRefreshData(() => API.pipeline.list({ page,
pageSize }), [page, pageSize]);
@@ -46,7 +46,12 @@ export const Pipelines = () => {
current: page,
pageSize,
total,
- onChange: setPage,
+ onChange: ((newPage: number, newPageSize: number) => {
+ setPage(newPage);
+ if (newPageSize !== pageSize) {
+ setPageSize(newPageSize);
+ }
+ }) as (newPage: number) => void,
}}
/>
</PageHeader>
diff --git a/config-ui/src/routes/project/home/index.tsx
b/config-ui/src/routes/project/home/index.tsx
index 8980edaba..8dc6cf0a2 100644
--- a/config-ui/src/routes/project/home/index.tsx
+++ b/config-ui/src/routes/project/home/index.tsx
@@ -34,7 +34,7 @@ import { IBlueprint } from '@/types';
export const ProjectHomePage = () => {
const [version, setVersion] = useState(1);
const [page, setPage] = useState(1);
- const [pageSize] = useState(20);
+ const [pageSize, setPageSize] = useState(20);
const [open, setOpen] = useState(false);
const [name, setName] = useState('');
const [saving, setSaving] = useState(false);
@@ -226,7 +226,12 @@ export const ProjectHomePage = () => {
current: page,
pageSize,
total,
- onChange: setPage,
+ onChange: ((newPage: number, newPageSize: number) => {
+ setPage(newPage);
+ if (newPageSize !== pageSize) {
+ setPageSize(newPageSize);
+ }
+ }) as (newPage: number) => void,
}}
/>
<Modal