Skip to content

Commit 706028d

Browse files
committed
Hide loader when component did update
1 parent f8647f2 commit 706028d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/index.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,11 @@ export default class InfiniteScroll extends Component<Props, State> {
144144
if (this.props.dataLength === prevProps.dataLength) return;
145145

146146
this.actionTriggered = false;
147+
148+
// update state when new data was sent in
149+
this.setState({
150+
showLoader: false,
151+
});
147152
}
148153

149154
static getDerivedStateFromProps(nextProps: Props, prevState: State) {

0 commit comments

Comments
 (0)