@kikiloaw/simple-table 1.0.6 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -6,6 +6,8 @@
6
6
  [![Vue 3](https://img.shields.io/badge/Vue-3.x-brightgreen.svg)](https://vuejs.org/)
7
7
  [![TypeScript](https://img.shields.io/badge/TypeScript-Ready-blue.svg)](https://www.typescriptlang.org/)
8
8
 
9
+ > **🚀 Explore the Demo**: Check out the [SimpleTable Demo Repository](https://github.com/kikiloaw/simple-table-demo.git) for a complete documentation site with live server-side examples, seeding, and source code.
10
+
9
11
  ---
10
12
 
11
13
  ## ✨ Why SimpleTable?
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kikiloaw/simple-table",
3
- "version": "1.0.6",
3
+ "version": "1.1.0",
4
4
  "description": "A lightweight, dependency-light DataTable component for Vue 3 with Tailwind CSS",
5
5
  "main": "src/index.js",
6
6
  "module": "src/index.js",
@@ -67,6 +67,8 @@ const props = withDefaults(defineProps<Props>(), {
67
67
  hoverColor: 'hover:bg-stone-200'
68
68
  })
69
69
 
70
+
71
+
70
72
  // ...
71
73
 
72
74
  // -- Computed: Page Sizes Normalization --
@@ -163,7 +165,7 @@ const densityConfig = computed(() => {
163
165
  </div>
164
166
  */
165
167
 
166
- const emit = defineEmits(['update:search', 'update:sort', 'page-change'])
168
+ const emit = defineEmits(['update:search', 'update:sort', 'page-change', 'fetched'])
167
169
 
168
170
  // -- State --
169
171
  const searchQuery = ref('')
@@ -464,6 +466,7 @@ async function fetchData(params: any = {}) {
464
466
  }
465
467
 
466
468
  internalData.value = data
469
+ emit('fetched', data)
467
470
 
468
471
  // Store in cache if enabled
469
472
  if (props.enableCache) {
@@ -644,6 +647,8 @@ defineExpose({
644
647
  clearCache // expose cache clearing method
645
648
  })
646
649
 
650
+
651
+
647
652
  // -- Helper Styles --
648
653
  function getCellClass(col: any, index: number, totalCols: number, rowIndex: number = -1) {
649
654
  let classes = col.class || ''
@@ -799,7 +804,12 @@ function getCellStyle(col: any) {
799
804
  <!-- Group Header Row: Single cell spanning all columns -->
800
805
  <template v-if="row._isGroupHeader">
801
806
  <TableCell :colspan="columns.length" class="border-b border-gray-200">
802
- <div :class="['px-2', densityConfig.groupHeaderPadding, 'font-semibold text-gray-700 text-sm uppercase tracking-wide']">
807
+ <div :class="[
808
+ 'px-2',
809
+ densityConfig.groupHeaderPadding,
810
+ 'font-semibold text-sm uppercase tracking-wide',
811
+ row._groupTitleClass || 'text-gray-700'
812
+ ]">
803
813
  {{ row._groupTitle }}
804
814
  </div>
805
815
  </TableCell>
@@ -7,6 +7,7 @@ const props = defineProps<{
7
7
  style?: any
8
8
  padding?: string
9
9
  height?: string
10
+ colspan?: number | string
10
11
  }>()
11
12
 
12
13
  const delegatedProps = computed(() => {