Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: data disappearing issue on re-clicking active tab/filter in app/service admin board #1100

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading