This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.rt-table::-webkit-scrollbar { | |
display: none; | |
} | |
.rt-table{ | |
-ms-overflow-style: none; | |
scrollbar-width: none; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const paginationComp = document.querySelector(".footer-wrapper"); | |
const ifInViewPort = isInViewport(paginationComp); | |
const scrollBar = document.getElementById("scroll-bar"); | |
if (ifInViewPort) { | |
scrollBar.style.position = "static"; | |
} else { | |
scrollBar.style.position = "fixed"; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isInViewport(element) { | |
const rect = element.getBoundingClientRect(); | |
return ( | |
rect.top >= 0 && | |
rect.left >= 0 && | |
rect.bottom - 62 <= (window.innerHeight || document.documentElement.clientHeight) && | |
rect.right <= (window.innerWidth || document.documentElement.clientWidth) | |
); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
handleScroll = () => { | |
const elm = document.getElementById("scroll-bar"); | |
const scrollLeft = elm.scrollLeft; | |
const tableBody = document.querySelector(".rt-table"); | |
tableBody.scrollLeft = scrollLeft; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
getTableBodyWidth = () => { | |
const tableBody = document.querySelector(".rt-table"); | |
if (tableBody) {return tableBody.scrollWidth;} | |
return 0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.scrollbarContainer { | |
overflow: scroll; | |
position: fixed; | |
bottom: 0; | |
width: 100%; | |
z-index: 1; | |
} | |
.scrollbarChild { | |
height: 1px; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div className="table"/> | |
<div id={"scroll-bar"} className={styles.scrollbarContainer} onScroll={this.handleScroll}> | |
<div style={{ width: this.getTableBodyWidth()}} className={styles.scrollbarChild} /> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"expo": { | |
"name": "your app name", | |
"description": "your app desc", | |
...., | |
"ios": { | |
"supportsTablet": true | |
}, | |
"android": { |