Skip to content

Commit

Permalink
fix #411 - Fix bug - Table overflow issues on ipad
Browse files Browse the repository at this point in the history
  • Loading branch information
sam-dassana committed Jul 23, 2021
1 parent 8394064 commit 6ff6078
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dassana-io/web-components",
"version": "0.11.20",
"version": "0.11.21",
"publishConfig": {
"registry": "https://npm.pkg.github.com/dassana-io"
},
Expand Down
7 changes: 5 additions & 2 deletions src/components/Table/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ export const Table = <Data,>({
const { classes: tableControlClasses = [], render: renderTableControls } =
tableControlsConfig

const { isMobile } = useWindowSize()
const {
isMobile,
windowSize: { width }
} = useWindowSize()

const tableClasses = useStyles({
onRowClick,
Expand Down Expand Up @@ -263,7 +266,7 @@ export const Table = <Data,>({
x: scrollConfig.x
}
}
} else if (isMobile) {
} else if (width <= 768) {
scrollProps = {
scroll: {
x: scrollConfig ? scrollConfig.x : columns.length * 150
Expand Down

0 comments on commit 6ff6078

Please sign in to comment.