Mobile adjustments
This commit is contained in:
@@ -7,7 +7,14 @@ export default class Listings extends React.Component {
|
||||
constructor (props) {
|
||||
super(props)
|
||||
|
||||
this.handleTouchMove = e => {
|
||||
const node = e.target
|
||||
const offset = node.scrollHeight - node.scrollTop - node.clientHeight
|
||||
console.log('HANDLE TOUCH MOVE OFFSET', offset)
|
||||
}
|
||||
|
||||
this.handleScroll = e => {
|
||||
console.log('scrolling');
|
||||
const node = e.target
|
||||
const offset = node.scrollHeight - node.scrollTop - node.clientHeight
|
||||
|
||||
@@ -123,11 +130,13 @@ export default class Listings extends React.Component {
|
||||
attachScrollListener () {
|
||||
const listings = findDOMNode(this.refs.listings)
|
||||
listings.parentNode.addEventListener('scroll', this.handleScroll)
|
||||
listings.parentNode.addEventListener('touchmove', this.handleTouchMove)
|
||||
}
|
||||
|
||||
removeScrollListener () {
|
||||
const listings = findDOMNode(this.refs.listings)
|
||||
listings.parentNode.removeEventListener('scroll', this.handleScroll)
|
||||
listings.parentNode.removeEventListener('touchmove', this.handleTouchMove)
|
||||
}
|
||||
|
||||
onSortChange (e) {
|
||||
|
||||
Reference in New Issue
Block a user