playbook_ui 14.11.0.pre.rc.14 → 14.11.0.pre.rc.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_table/_table.tsx +8 -1
- data/app/pb_kits/playbook/pb_table/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_table/docs/index.js +2 -0
- data/dist/chunks/_weekday_stacked-CJTPh4if.js +45 -0
- data/dist/chunks/vendor.js +1 -1
- data/dist/playbook-doc.js +1 -1
- data/lib/playbook/version.rb +1 -1
- metadata +2 -2
- data/dist/chunks/_weekday_stacked-KhE_lsdt.js +0 -45
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: caaa8ef768bf3d4ce1eccc3ea9f2ab8821d5809a0d959ca9da5a06b091c46fb8
|
4
|
+
data.tar.gz: f7cf447b160f0ff975b6d26579871d72a358a212394544f0393078f2f86040ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5d42d032c284243dac212cd60662402baa057344340c1fbe5951b008ac475e2477ff44e8d7365f1f3c6a132960c28434dbc7d85ebc81442ed7b73fef850a491
|
7
|
+
data.tar.gz: b0cb1d6b1fa1dc524b07cea7ceedc06ae84fb4cb1ef8a799d8cb5879693dd26ccb8b05c9a4a34b9f4e43cd1f7c7d90bb6249b622ae6e5f23a925a6d5b08ba20a
|
@@ -69,6 +69,7 @@ const Table = (props: TableProps): React.ReactElement => {
|
|
69
69
|
const outerPaddingCss = outerPadding ? `outer_padding_${spaceCssName}${outerPadding}` : ''
|
70
70
|
const isTableTag = tag === 'table'
|
71
71
|
const dynamicInlineProps = globalInlineProps(props)
|
72
|
+
const stickyRightColumnReversed = stickyRightColumn.reverse()
|
72
73
|
|
73
74
|
const classNames = classnames(
|
74
75
|
'pb_table',
|
@@ -148,7 +149,7 @@ const Table = (props: TableProps): React.ReactElement => {
|
|
148
149
|
if (!stickyRightColumn.length) return;
|
149
150
|
let accumulatedWidth = 0;
|
150
151
|
|
151
|
-
|
152
|
+
stickyRightColumnReversed.forEach((colId, index) => {
|
152
153
|
const isLastColumn = index === stickyRightColumn.length - 1;
|
153
154
|
const header = document.querySelector(`th[id="${colId}"]`);
|
154
155
|
const cells = document.querySelectorAll(`td[id="${colId}"]`);
|
@@ -186,6 +187,12 @@ const Table = (props: TableProps): React.ReactElement => {
|
|
186
187
|
setTimeout(() => {
|
187
188
|
handleStickyRightColumns();
|
188
189
|
}, 10);
|
190
|
+
|
191
|
+
window.addEventListener('resize', handleStickyRightColumns);
|
192
|
+
|
193
|
+
return () => {
|
194
|
+
window.removeEventListener('resize', handleStickyRightColumns);
|
195
|
+
};
|
189
196
|
}, [stickyRightColumn]);
|
190
197
|
|
191
198
|
useEffect(() => {
|
@@ -35,6 +35,8 @@ examples:
|
|
35
35
|
- table_lg: Large
|
36
36
|
- table_sticky: Sticky Header
|
37
37
|
- table_sticky_left_columns: Sticky Left Column
|
38
|
+
- table_sticky_right_columns: Sticky Right Column
|
39
|
+
- table_sticky_columns: Sticky Left and Right Columns
|
38
40
|
- table_alignment_row: Row Alignment
|
39
41
|
- table_alignment_column: Cell Alignment
|
40
42
|
- table_alignment_shift_row: Row Shift
|
@@ -26,6 +26,8 @@ export { default as TableWithSubcomponents } from './_table_with_subcomponents.j
|
|
26
26
|
export { default as TableWithSubcomponentsAsDivs } from './_table_with_subcomponents_as_divs.jsx'
|
27
27
|
export { default as TableOuterPadding } from './_table_outer_padding.jsx'
|
28
28
|
export { default as TableStickyLeftColumns } from './_table_sticky_left_columns.jsx'
|
29
|
+
export { default as TableStickyRightColumns } from './_table_sticky_right_columns.jsx'
|
30
|
+
export { default as TableStickyColumns } from './_table_sticky_columns.jsx'
|
29
31
|
export { default as TableWithCollapsible } from './_table_with_collapsible.jsx'
|
30
32
|
export { default as TableWithCollapsibleWithCustomContent } from './_table_with_collapsible_with_custom_content.jsx'
|
31
33
|
export { default as TableWithCollapsibleWithNestedTable } from './_table_with_collapsible_with_nested_table.jsx'
|