diff options
author | Dessalines <tyhou13@gmx.com> | 2019-08-29 16:49:58 -0700 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2019-08-29 16:49:58 -0700 |
commit | 2d112dbd55f6ad252c593f8c020ae9aadb386de0 (patch) | |
tree | f1f2cb77dacf22bfc9bed69c1677658dcbe2c355 /ui/src/components/main.tsx | |
parent | 4f427d0e613db94b2e5064fd68467531d1b77bbc (diff) |
Add loading indicators.
Diffstat (limited to 'ui/src/components/main.tsx')
-rw-r--r-- | ui/src/components/main.tsx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/src/components/main.tsx b/ui/src/components/main.tsx index 0a7a31e5..513c75d0 100644 --- a/ui/src/components/main.tsx +++ b/ui/src/components/main.tsx @@ -354,6 +354,7 @@ export class Main extends Component<any, MainState> { 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<any, MainState> { 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<any, MainState> { 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<any, MainState> { 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(); |