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

feat(images): Implement design for image table MAASENG-4360 #5628

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
7 changes: 5 additions & 2 deletions src/app/base/components/GenericTable/GenericTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,11 @@ const GenericTable = <T extends { id: string | number }>({
<thead>
{table.getHeaderGroups().map((headerGroup) => (
<tr key={headerGroup.id}>
{headerGroup.headers.filter(filterHeaders).map((header) => (
<TableHeader header={header} key={header.id} />
{headerGroup.headers.filter(filterHeaders).map((header, index) => (
<>
<TableHeader header={header} key={header.id} />
{index === 2 ? <th className="select-alignment" /> : null}
</>
))}
</tr>
))}
Expand Down
12 changes: 10 additions & 2 deletions src/app/base/components/GenericTable/_index.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
.p-generic-table {
thead, tbody {

thead,
tbody {
display: table-row-group;
width: 100%;
}

.group-select, .select {
.group-select,
.select,
.select-alignment {
width: 2rem;
}

th.select {
display: none;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ const useImageTableColumns = ({
? isCommissioningImage
? "Cannot delete images of the default commissioning release."
: "Cannot delete images that are currently being imported."
: null
: "Deletes this image."
}
onDelete={() => onDelete(row)}
/>
Expand Down