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(connector management): fix details overlay #1142

Merged
merged 3 commits into from
Sep 24, 2024
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 @@ -11,6 +11,8 @@

### Bugfixes

- **Connector Management**
- fixed overlay enabling on click of managed connectors(details) [#1142](https://github.com/eclipse-tractusx/portal-frontend/pull/1142)
- **Connector Management**
- fixed customer link selection and fixed resetting values [#1119](https://github.com/eclipse-tractusx/portal-frontend/pull/1119)

Expand Down
15 changes: 4 additions & 11 deletions src/components/pages/EdcConnector/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,16 +158,12 @@ const EdcConnector = () => {
setAddConnectorOverlayOpen(false)
}

const onTableCellClick = (params: GridCellParams, title: string) => {
const onTableCellClick = (params: GridCellParams) => {
// Show overlay only when detail field clicked
if (
params.field === 'details' &&
title === t('content.edcconnector.tabletitle')
) {
if (params.field === 'details') {
setOpenDetailsOverlay(true)
setOverlayData(params.row)
}

setSelectedConnector(params.row as ConnectorContentAPIResponse)
}

Expand Down Expand Up @@ -508,7 +504,7 @@ const EdcConnector = () => {
getRowId={(row: { [key: string]: string }) => row.id}
columns={ownConnectorCols}
onCellClick={(params: GridCellParams) => {
onTableCellClick(params, t('content.edcconnector.tabletitle'))
onTableCellClick(params)
}}
/>
</div>
Expand All @@ -525,10 +521,7 @@ const EdcConnector = () => {
columns={managedConnectorCols}
noRowsMsg={t('content.edcconnector.noConnectorsMessage')}
onCellClick={(params: GridCellParams) => {
onTableCellClick(
params,
t('content.edcconnector.managedtabletitle')
)
onTableCellClick(params)
}}
/>
</div>
Expand Down
Loading