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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 392b890c5210bbfd4bd949f30717b1eb5d3cb6072108595ee8a28d1caf868435
4
- data.tar.gz: d768258037273fb3be827c7668d71757dc6984473784f5b1719c7bc5331ef8af
3
+ metadata.gz: caaa8ef768bf3d4ce1eccc3ea9f2ab8821d5809a0d959ca9da5a06b091c46fb8
4
+ data.tar.gz: f7cf447b160f0ff975b6d26579871d72a358a212394544f0393078f2f86040ae
5
5
  SHA512:
6
- metadata.gz: 856857b42f0f319dfae33ab64e91594c80e035bad901b783880d9056fda116d3280372486399480f882d1b3095a3a0cf31e0fd78b20f7b81693f2b406b42bf8c
7
- data.tar.gz: 6c78b48c806fba97842d34dc9cc766838748ead66ab63aaded3282daddb775fe4721859b2c58907a8fe6ee8b4fffe0ab1edfc737f786c7c39cb3eb8edb91c3f4
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
- stickyRightColumn.reverse().forEach((colId, index) => {
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'