Skip to content

Commit

Permalink
fix: data disappearing issue on re-clicking active tab/filter in app/…
Browse files Browse the repository at this point in the history
…service admin board (#1100)
  • Loading branch information
shahmargi12 authored Sep 17, 2024
1 parent c8b03ea commit 1b794dd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
- **OSP Consent form**
- Display invited company name in OSP consent form (Previously hard coded with 'BMW') [#1083](https://github.com/eclipse-tractusx/portal-frontend/pull/1083)
- Fixed missing street number in form [#1081](https://github.com/eclipse-tractusx/portal-frontend/issues/1081)
- **App and Service Admin board**
- Fix data disappearing issue on re-clicking active tab/filter in app/service admin board [#1100](https://github.com/eclipse-tractusx/portal-frontend/pull/1100)

## Unreleased 2.2.0-RC3

Expand Down
24 changes: 13 additions & 11 deletions src/components/shared/templates/AdminBoard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,6 @@ export default function CommonAdminBoard({

const resetAppCards = useCallback(
(value: string, type: string) => {
setState({ type: ActionKind.SET_APPS_AND_APP_CARDS, payload: [] })
setState({
type: ActionKind.SET_REQUEST_BODY,
payload: {
Expand Down Expand Up @@ -468,16 +467,19 @@ export default function CommonAdminBoard({
refetch={refetch}
/>
)}
{!isFetching && data?.meta && data?.meta?.totalPages > page + 1 && (
<div
style={{
textAlign: 'center',
marginTop: '30px',
}}
>
<LoadMoreButton onClick={nextPage} label={loadMoreButtonText} />
</div>
)}
{!isFetching &&
appCards?.length > 0 &&
data?.meta &&
data?.meta?.totalPages > page + 1 && (
<div
style={{
textAlign: 'center',
marginTop: '30px',
}}
>
<LoadMoreButton onClick={nextPage} label={loadMoreButtonText} />
</div>
)}
</div>
<div style={{ height: '66px' }}></div>
</div>
Expand Down

0 comments on commit 1b794dd

Please sign in to comment.