From dde2e5293a31ac22def8b268704eb369af79bce5 Mon Sep 17 00:00:00 2001 From: MattMo Date: Sat, 22 Apr 2023 20:21:45 -0700 Subject: [PATCH] Made table rounded without having to user overflow hidden. --- data-table.js | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/data-table.js b/data-table.js index 42eefd4..63bc485 100644 --- a/data-table.js +++ b/data-table.js @@ -31,6 +31,26 @@ class DataTable extends IgniteElement { super(); } + get styles() { + return /*css*/` + bt-data-table table thead th:first-child { + border-top-left-radius: var(--bs-border-radius); + } + + bt-data-table table thead th:last-child { + border-top-right-radius: var(--bs-border-radius); + } + + bt-data-table table tbody tr:last-child td:first-child { + border-bottom-left-radius: var(--bs-border-radius); + } + + bt-data-table table tbody tr:last-child td:last-child { + border-bottom-right-radius: var(--bs-border-radius); + } + `; + } + get properties() { return { columns: [], @@ -128,7 +148,7 @@ class DataTable extends IgniteElement { ), //Rows - new div().class("table-responsive rounded-2 mb-3").child( + new div().class("mb-3").child( new table().class("table table-striped align-middle mb-0 table-borderless").child( //Table columns new thead().class("table-dark").child(