Skip to content

Commit 5a495f9

Browse files
committed
adds settable row height
1 parent e032660 commit 5a495f9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "svelte-generic-crud-table",
3-
"version": "1.5.63",
3+
"version": "1.5.64",
44
"description": "<crud-table> renders object-arrays with options-panel and inline edit per row. Dispatches events for ongoing data handling. As self-containing webcomponent or for Svelte in 60KB",
55
"main": "dist/build/crud-table.js",
66
"module": "dist/build/crud-table.mjs",

src/SvelteGenericCrudTable.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@
172172
{#if Array.isArray(table_data)}
173173
<div class="table">
174174
<div class="thead"
175-
style="max-height:{(table_config.row_settings !== undefined) && (table_config.row_settings.height !== undefined) ? table_config.row_settings.height : table_config_default.row_settings.height};">
175+
style="border-left: 0.1em solid #efefef;max-height:{(table_config.row_settings !== undefined) && (table_config.row_settings.height !== undefined) ? table_config.row_settings.height : table_config_default.row_settings.height};">
176176
<!-- /* istanbul ignore next line */ -->
177177
{#each table_config.columns_setting as elem, index}
178178
<!-- /* istanbul ignore next line */ -->
@@ -201,7 +201,7 @@
201201
<!-- /* istanbul ignore next line */ -->
202202
{#each table_data as tableRow, i (tableRow)}
203203
<div class="row"
204-
style="min-height:{(table_config.row_settings !== undefined) && (table_config.row_settings.height !== undefined) ? table_config.row_settings.height : table_config_default.row_settings.height};">
204+
style="background-color:{i % 2 === 0 ? '#fefefe' : 'none'};min-height:{(table_config.row_settings !== undefined) && (table_config.row_settings.height !== undefined) ? table_config.row_settings.height : table_config_default.row_settings.height};">
205205
{#each table_config.columns_setting as column_order, j}
206206
{#each Object.entries(tableRow) as elem, k}
207207
<!-- /* istanbul ignore next */ -->
@@ -349,7 +349,7 @@
349349
.td {
350350
color: #5f5f5f;
351351
border: none;
352-
border-left: 0.1em solid #efefef;
352+
border-left: 0.1em solid transparent;
353353
font-weight: 100;
354354
padding: 0.2em 0 0.1em 0.4em;
355355
float: left;

0 commit comments

Comments
 (0)