Skip to content

Commit 8259c23

Browse files
committed
Refactor ExceptionsTable rendering logic to separate table rendering into a private method and handle empty state with a user-friendly message.
1 parent 5e7dc21 commit 8259c23

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/exceptions-table.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ export class ExceptionsTable extends LitElement {
159159
}
160160
}
161161

162-
render() {
162+
private renderTable() {
163163
return html`
164164
<div class="table-container">
165165
<table>
@@ -219,4 +219,11 @@ export class ExceptionsTable extends LitElement {
219219
<exception-dialog></exception-dialog>
220220
`;
221221
}
222+
223+
render() {
224+
if (this.filteredEntries.length === 0) {
225+
return html`<div>No entries found.</div>`;
226+
}
227+
return this.renderTable();
228+
}
222229
}

0 commit comments

Comments
 (0)