Skip to content

Commit

Permalink
[desk-tool] Remove unused scrollTop handler
Browse files Browse the repository at this point in the history
  • Loading branch information
rexxars committed Dec 18, 2019
1 parent 0ff5cad commit 693c2e4
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions packages/@sanity/desk-tool/src/pane/DocumentsListPane.js
Expand Up @@ -122,7 +122,7 @@ export default class DocumentsListPane extends React.PureComponent {
}
}

state = {scrollTop: 0, sortOrder: null, layout: null}
state = {sortOrder: null, layout: null}

constructor(props) {
super()
Expand Down Expand Up @@ -192,10 +192,6 @@ export default class DocumentsListPane extends React.PureComponent {
return true
}

handleScroll = scrollTop => {
this.setState({scrollTop})
}

buildListQuery() {
const {options} = this.props
const {filter, defaultOrdering} = options
Expand Down Expand Up @@ -252,7 +248,6 @@ export default class DocumentsListPane extends React.PureComponent {
className={className}
styles={this.props.styles}
index={this.props.index}
scrollTop={this.state.scrollTop}
menuItems={menuItems}
menuItemGroups={menuItemGroups}
initialValueTemplates={initialValueTemplates}
Expand Down Expand Up @@ -311,7 +306,6 @@ export default class DocumentsListPane extends React.PureComponent {
{items && (
<InfiniteList
className={listStyles.scroll}
onScroll={this.handleScroll}
items={items}
layout={layout}
getItemKey={getDocumentKey}
Expand Down

0 comments on commit 693c2e4

Please sign in to comment.