@teipublisher/pb-components 3.1.0 → 3.2.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/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ # [3.2.0](https://github.com/eeditiones/tei-publisher-components/compare/v3.1.0...v3.2.0) (2026-03-26)
2
+
3
+
4
+ ### Features
5
+
6
+ * **pb-table-grid:** allow columns to be hidden/shown dynamically ([297fb8b](https://github.com/eeditiones/tei-publisher-components/commit/297fb8bd93701b88281bfb2cd19e6a631cb2880e))
7
+ * **pb-table-grid:** highlight currently selected row ([27bf14d](https://github.com/eeditiones/tei-publisher-components/commit/27bf14d4d44413ea4f673157e40fbcce0228e81c))
8
+
1
9
  # [3.1.0](https://github.com/eeditiones/tei-publisher-components/compare/v3.0.9...v3.1.0) (2026-03-25)
2
10
 
3
11
 
@@ -49,7 +49,12 @@
49
49
  <h1>Using pb-table-grid with Search and Pagination</h1>
50
50
 
51
51
  <pb-page theme="components.css" url-path="query" api-version="1.0.0">
52
+ <label>
53
+ <input id="compact-view" type="checkbox" />
54
+ Compact view (hide "Born" and "Died" columns)
55
+ </label>
52
56
  <pb-table-grid
57
+ id="philosophers-grid"
53
58
  class="table-grid"
54
59
  source="./philosophers.json"
55
60
  css-path="../css/gridjs"
@@ -70,5 +75,15 @@
70
75
  <pb-table-column label="Known For" property="known_for"></pb-table-column>
71
76
  </pb-table-grid>
72
77
  </pb-page>
78
+ <script type="module">
79
+ const compactCheckbox = document.getElementById('compact-view');
80
+ const tableGrid = document.getElementById('philosophers-grid');
81
+
82
+ compactCheckbox.addEventListener('change', () => {
83
+ tableGrid.visibleColumns = compactCheckbox.checked
84
+ ? ['name', 'nationality', 'known_for']
85
+ : ['name', 'birth', 'death', 'nationality', 'known_for'];
86
+ });
87
+ </script>
73
88
  </body>
74
89
  </html>