From 2d112dbd55f6ad252c593f8c020ae9aadb386de0 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Thu, 29 Aug 2019 16:49:58 -0700 Subject: [PATCH] Add loading indicators. --- ui/src/components/main.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ui/src/components/main.tsx b/ui/src/components/main.tsx index 0a7a31e59..513c75d07 100644 --- a/ui/src/components/main.tsx +++ b/ui/src/components/main.tsx @@ -354,6 +354,7 @@ export class Main extends Component { nextPage(i: Main) { i.state.page++; + i.state.loading = true; i.setState(i.state); i.updateUrl(); i.fetchPosts(); @@ -361,6 +362,7 @@ export class Main extends Component { prevPage(i: Main) { i.state.page--; + i.state.loading = true; i.setState(i.state); i.updateUrl(); i.fetchPosts(); @@ -369,6 +371,7 @@ export class Main extends Component { handleSortChange(i: Main, event: any) { i.state.sort = Number(event.target.value); i.state.page = 1; + i.state.loading = true; i.setState(i.state); i.updateUrl(); i.fetchPosts(); @@ -377,6 +380,7 @@ export class Main extends Component { handleTypeChange(i: Main, event: any) { i.state.type_ = Number(event.target.value); i.state.page = 1; + i.state.loading = true; i.setState(i.state); i.updateUrl(); i.fetchPosts();