Skip to content

Commit

Permalink
fix(AnalyticalTable): fix scrollbar issue on column reorder & initial…
Browse files Browse the repository at this point in the history
… horizontal scrolling (#413)
  • Loading branch information
MarcusNotheis authored Apr 8, 2020
1 parent ece31fd commit 4665db7
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 14 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/compressed-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ jobs:
- uses: preactjs/compressed-size-action@v1
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
pattern: 'lib/*.js'
pattern: 'packages/**/lib/**/*.js'
exlude: 'packages/**/src/lib/**'
compression: 'gzip'
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ const styles = {
position: 'relative',
width: '100%',
overflowX: 'hidden',
padding: `0 0.5rem`
padding: `0 0.5rem`,
boxSizing: 'border-box'
},
iconContainer: {
display: 'inline-block',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4902,7 +4902,7 @@ exports[`AnalyticalTable test drag and drop of a draggable column 1`] = `
style="position: absolute; left: 0px; top: 0px; height: 44px; width: 100%;"
>
<div
aria-colindex="1"
aria-colindex="2"
class="AnalyticalTable-tableCell-0"
role="cell"
style="position: absolute; top: 0px; left: 150px; width: 150px; align-items: center;"
Expand All @@ -4917,7 +4917,7 @@ exports[`AnalyticalTable test drag and drop of a draggable column 1`] = `
</span>
</div>
<div
aria-colindex="2"
aria-colindex="1"
class="AnalyticalTable-tableCell-0"
role="cell"
style="position: absolute; top: 0px; left: 0px; width: 150px; align-items: center;"
Expand Down Expand Up @@ -4969,7 +4969,7 @@ exports[`AnalyticalTable test drag and drop of a draggable column 1`] = `
style="position: absolute; left: 0px; top: 44px; height: 44px; width: 100%;"
>
<div
aria-colindex="1"
aria-colindex="2"
class="AnalyticalTable-tableCell-0"
role="cell"
style="position: absolute; top: 0px; left: 150px; width: 150px; align-items: center;"
Expand All @@ -4984,7 +4984,7 @@ exports[`AnalyticalTable test drag and drop of a draggable column 1`] = `
</span>
</div>
<div
aria-colindex="2"
aria-colindex="1"
class="AnalyticalTable-tableCell-0"
role="cell"
style="position: absolute; top: 0px; left: 0px; width: 150px; align-items: center;"
Expand Down Expand Up @@ -5036,14 +5036,14 @@ exports[`AnalyticalTable test drag and drop of a draggable column 1`] = `
style="position: absolute; left: 0px; top: 88px; height: 44px; width: 100%;"
>
<div
aria-colindex="1"
aria-colindex="2"
class="AnalyticalTable-tableCell-0"
role="cell"
style="position: absolute; top: 0px; left: 150px; width: 150px; align-items: center;"
tabindex="-1"
/>
<div
aria-colindex="2"
aria-colindex="1"
class="AnalyticalTable-tableCell-0"
role="cell"
style="position: absolute; top: 0px; left: 0px; width: 150px; align-items: center;"
Expand Down Expand Up @@ -5071,14 +5071,14 @@ exports[`AnalyticalTable test drag and drop of a draggable column 1`] = `
style="position: absolute; left: 0px; top: 132px; height: 44px; width: 100%;"
>
<div
aria-colindex="1"
aria-colindex="2"
class="AnalyticalTable-tableCell-0"
role="cell"
style="position: absolute; top: 0px; left: 150px; width: 150px; align-items: center;"
tabindex="-1"
/>
<div
aria-colindex="2"
aria-colindex="1"
class="AnalyticalTable-tableCell-0"
role="cell"
style="position: absolute; top: 0px; left: 0px; width: 150px; align-items: center;"
Expand Down Expand Up @@ -5106,14 +5106,14 @@ exports[`AnalyticalTable test drag and drop of a draggable column 1`] = `
style="position: absolute; left: 0px; top: 176px; height: 44px; width: 100%;"
>
<div
aria-colindex="1"
aria-colindex="2"
class="AnalyticalTable-tableCell-0"
role="cell"
style="position: absolute; top: 0px; left: 150px; width: 150px; align-items: center;"
tabindex="-1"
/>
<div
aria-colindex="2"
aria-colindex="1"
class="AnalyticalTable-tableCell-0"
role="cell"
style="position: absolute; top: 0px; left: 0px; width: 150px; align-items: center;"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { VerticalAlign } from '@ui5/webcomponents-react/lib/VerticalAlign';
import { CSSProperties } from 'react';

const getCellProps = (cellProps, { cell: { column }, instance }) => {
const lastColumnId = instance.columns[instance.columns.length - 1]?.id;
const columnIndex = instance.columns.findIndex(({ id }) => id === column.id);
const lastColumnId = instance.visibleColumns[instance.visibleColumns.length - 1]?.id;
const columnIndex = instance.visibleColumns.findIndex(({ id }) => id === column.id);
const { classes } = instance.webComponentsReactProperties;
const style: CSSProperties = {};

Expand Down

0 comments on commit 4665db7

Please sign in to comment.