From 885779d469e6a59e28b41c5c1d137e60d37d3d40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20Gro=C3=9F?= Date: Sun, 5 Apr 2020 10:36:51 +0200 Subject: [PATCH] fix: "Load more" not clickable after 1st click on 3-dot --- src/components/PostsContainer.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/PostsContainer.js b/src/components/PostsContainer.js index ec21c14..79b44c0 100644 --- a/src/components/PostsContainer.js +++ b/src/components/PostsContainer.js @@ -112,6 +112,10 @@ export default class PostsContainer extends Component { handleBtnClick(event) { event.target.disabled = true this.loadData() + + window.setTimeout(() => { + event.target.disabled = false + }, 15000) // let user retry if nothing has happened after 15 sec } addStorageListener() { @@ -169,7 +173,6 @@ export default class PostsContainer extends Component { ) } - // @TODO: Implement https://github.com/valdrinkoshi/virtual-list render() { const { hasCategories } = this.props const { items, timeout } = this.state @@ -179,7 +182,9 @@ export default class PostsContainer extends Component {
{Posts(items, this.renderPost, hasCategories)}
- +
)