Attempt to fix border-bottom

This commit is contained in:
zandercymatics 2025-01-28 08:39:35 -07:00
parent 9b1d1d1530
commit 241b43e815
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
3 changed files with 8 additions and 26 deletions

View file

@ -473,7 +473,9 @@ export class BaseTable {
let dataObjects = this.getDataObjects(data);
let customTableOptions = this.customizeTable(data);
this.loadRows(dataObjects, tbody, customTableOptions)
dataObjects.forEach(dataObject => {
this.addRow(dataObject, tbody, customTableOptions);
});
this.initShowMoreButtons();
this.initCheckboxListeners();
@ -501,12 +503,6 @@ export class BaseTable {
.catch(error => console.error('Error fetching objects:', error));
}
loadRows(dataObjects, tbody, customTableOptions) {
dataObjects.forEach(dataObject => {
this.addRow(dataObject, tbody, customTableOptions);
});
}
// Add event listeners to table headers for sorting
initializeTableHeaders() {
this.tableHeaders.forEach(header => {

View file

@ -66,14 +66,7 @@ export class MembersTable extends BaseTable {
};
}
loadRows(dataObjects, tbody, customTableOptions) {
dataObjects.forEach((dataObject, index) => {
const isLastRow = index === dataObjects.length - 1;
this.addRow(dataObject, tbody, customTableOptions, isLastRow);
});
}
addRow(dataObject, tbody, customTableOptions, isLastRow) {
addRow(dataObject, tbody, customTableOptions) {
const member = dataObject;
// member is based on either a UserPortfolioPermission or a PortfolioInvitation
// and also includes information from related domains; the 'id' of the org_member
@ -88,10 +81,6 @@ export class MembersTable extends BaseTable {
const kebabHTML = customTableOptions.hasAdditionalActions ? generateKebabHTML('remove-member', unique_id, cancelInvitationButton, `Expand for more options for ${member.name}`): '';
const row = document.createElement('tr');
if (isLastRow) {
row.classList.add("hide-td-borders");
}
let admin_tagHTML = ``;
if (member.is_admin)
admin_tagHTML = `<span class="usa-tag margin-left-1 bg-primary-dark text-semibold">Admin</span>`

View file

@ -41,12 +41,9 @@ th {
}
}
.members__table-wrapper .dotgov-table {
tr:not(.hide-td-borders):not(:last-of-type) {
td, th {
border-bottom: 1px solid color('base-lighter');
}
}
.members__table-wrapper .dotgov-table tr:nth-last-child(2) td,
.members__table-wrapper .dotgov-table tr:nth-last-child(2) th {
border-bottom: none !important;
}
.dotgov-table {
@ -64,7 +61,7 @@ th {
border: none;
}
tr:not(.hide-td-borders) {
tr:not(.hide-td-borders):not(:last-of-type) {
td, th {
border-bottom: 1px solid color('base-lighter');
}