Skip to content

Commit

Permalink
fix: data table test-id table
Browse files Browse the repository at this point in the history
  • Loading branch information
Lisi Linhart committed Oct 23, 2023
1 parent 67a2318 commit 93db354
Show file tree
Hide file tree
Showing 2 changed files with 14,416 additions and 10,271 deletions.
16 changes: 8 additions & 8 deletions src/components/DataTable/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const SbDataTable = {

allRowsSelected() {
const selectableItems = this.items.filter(
(item) => item.selectable !== false
(item) => item.selectable !== false,
)

if (this.selectionMode === 'single' || !this.selectedRows.length)
Expand Down Expand Up @@ -65,8 +65,8 @@ const SbDataTable = {
hasSelectedRowsInList() {
return this.items.filter((item) =>
this.selectedRows.some(
(row) => JSON.stringify(item) === JSON.stringify(row)
)
(row) => JSON.stringify(item) === JSON.stringify(row),
),
)
},

Expand Down Expand Up @@ -245,7 +245,7 @@ const SbDataTable = {
row: tableRow,
'data-testid': `${this.dataTestid}-column__${index}`,
},
tableData.children
tableData.children,
)
})

Expand All @@ -259,7 +259,7 @@ const SbDataTable = {
rowId: `${this.rowIdPrefix}-${index}`,
'data-testid': `${this.dataTestid}-body-row__${index}`,
},
() => [columns]
() => [columns],
)
})
}
Expand All @@ -268,7 +268,7 @@ const SbDataTable = {
'table',
{
class: 'sb-data-table__container',
'data-testid': this.dataTestid,
'data-testid': this.dataTestid + '-table',
},
[
this.showHeader
Expand Down Expand Up @@ -309,7 +309,7 @@ const SbDataTable = {
h('tbody', bodyData),
]
: null,
]
],
)
}

Expand All @@ -328,7 +328,7 @@ const SbDataTable = {
this.hasSelectedRowsInList.length > 0 && renderActions(),
renderTable(),
this.isLoading,
]
],
)
},
}
Expand Down
Loading

0 comments on commit 93db354

Please sign in to comment.