Skip to content

Commit

Permalink
Merge pull request #75 from netguru/BN-1730
Browse files Browse the repository at this point in the history
[BN-1730] Unnecessary getNode() removed
  • Loading branch information
IdaszakDaniel committed Apr 22, 2020
2 parents 6f5c063 + ee5d224 commit 73008f8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/StickyParallaxHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class StickyParallaxHeader extends Component {
}

spring = () => {
const scrollNode = this.scroll.getNode()
const scrollNode = this.scroll
scrollNode.scrollTo({ x: 0, y: 40, animated: true })

return setTimeout(() => {
Expand All @@ -51,7 +51,7 @@ class StickyParallaxHeader extends Component {

onScrollEndSnapToEdge = (scrollHeight) => {
const { snapToEdge } = this.props
const scrollNode = this.scroll.getNode()
const scrollNode = this.scroll
// eslint-disable-next-line no-underscore-dangle
const scrollValue = this.scrollY.__getValue()
const { y } = scrollValue
Expand Down Expand Up @@ -136,7 +136,7 @@ class StickyParallaxHeader extends Component {
})
}
if (this.scrollView) {
this.scrollView.getNode().scrollTo({
this.scrollView.scrollTo({
x: offset,
y: 0,
animated: true
Expand Down
6 changes: 3 additions & 3 deletions src/components/ScrollableTabView/ScrollableTabView.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class ScrollableTabView extends React.Component {
const { children, page } = this.props
const { currentPage } = this.state

if (children !== prevProps.children) this.updateSceneKeys({ page: currentPage, children: children })
if (children !== prevProps.children) this.updateSceneKeys({ page: currentPage, children })

if (page !== currentPage && page >= 0) this.goToPage(page)
}
Expand Down Expand Up @@ -81,7 +81,7 @@ class ScrollableTabView extends React.Component {

return (
isHeaderFolded &&
scrollRef.getNode().scrollTo({
scrollRef.scrollTo({
y: scrollHeight,
duration: 1000
})
Expand Down Expand Up @@ -167,7 +167,7 @@ class ScrollableTabView extends React.Component {
const { containerWidth } = this.state
const offset = pageNumber * containerWidth
if (this.scrollView) {
this.scrollView.getNode().scrollTo({ x: offset, y: 0, animated: true })
this.scrollView.scrollTo({ x: offset, y: 0, animated: true })
}

const { currentPage } = this.state
Expand Down

0 comments on commit 73008f8

Please sign in to comment.