Skip to content

Commit

Permalink
fix(Table): add missing classes in app.config.ts
Browse files Browse the repository at this point in the history
Fixes #655
  • Loading branch information
benjamincanac committed Sep 11, 2023
1 parent a90e95f commit a603ea5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/runtime/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ const table = {
font: '',
size: 'text-sm'
},
checkbox: {
padding: 'ps-4'
},
loadingState: {
wrapper: 'flex flex-col items-center justify-center flex-1 px-6 py-14 sm:px-14',
label: 'text-sm text-center text-gray-900 dark:text-white',
Expand Down
4 changes: 2 additions & 2 deletions src/runtime/components/data/Table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<table :class="[ui.base, ui.divide]">
<thead :class="ui.thead">
<tr :class="ui.tr.base">
<th v-if="modelValue" scope="col" class="ps-4">
<th v-if="modelValue" scope="col" :class="ui.checkbox.padding">
<UCheckbox :checked="indeterminate || selected.length === rows.length" :indeterminate="indeterminate" aria-label="Select all" @change="onChange" />
</th>

Expand Down Expand Up @@ -50,7 +50,7 @@

<template v-else>
<tr v-for="(row, index) in rows" :key="index" :class="[ui.tr.base, isSelected(row) && ui.tr.selected, $attrs.onSelect && ui.tr.active]" @click="() => onSelect(row)">
<td v-if="modelValue" class="ps-4">
<td v-if="modelValue" :class="ui.checkbox.padding">
<UCheckbox v-model="selected" :value="row" aria-label="Select row" @click.stop />
</td>

Expand Down

0 comments on commit a603ea5

Please sign in to comment.