Skip to content
Snippets Groups Projects
Commit b4a3046d authored by Chris Lawton's avatar Chris Lawton Committed by Todd Dembrey
Browse files

add missing ref and update items after rebase

parent 9d19215c
No related branches found
No related tags found
No related merge requests found
...@@ -19,6 +19,11 @@ export default class Listing extends React.Component { ...@@ -19,6 +19,11 @@ export default class Listing extends React.Component {
handleRetry: PropTypes.func, handleRetry: PropTypes.func,
}; };
constructor(props) {
super(props);
this.listRef = React.createRef();
}
renderListItems() { renderListItems() {
const { const {
isError, isError,
...@@ -44,7 +49,7 @@ export default class Listing extends React.Component { ...@@ -44,7 +49,7 @@ export default class Listing extends React.Component {
} }
return ( return (
<ul className="listing__list" ref={this.myRef}> <ul className="listing__list" ref={this.listRef}>
{items.map(v => renderItem(v))} {items.map(v => renderItem(v))}
</ul> </ul>
); );
...@@ -67,9 +72,9 @@ export default class Listing extends React.Component { ...@@ -67,9 +72,9 @@ export default class Listing extends React.Component {
<div className="listing"> <div className="listing">
<div className="listing__header"> <div className="listing__header">
<ListingDropdown <ListingDropdown
list={this.myRef.current} list={this.listRef.current}
error={this.props.isLoading} error={this.props.isLoading}
items={this.state.orderedItems} items={this.props.items}
isLoading={this.props.isLoading} isLoading={this.props.isLoading}
/> />
</div> </div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment