mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-10-01 01:36:12 -04:00
Add loading indicators.
This commit is contained in:
parent
4f427d0e61
commit
2d112dbd55
4
ui/src/components/main.tsx
vendored
4
ui/src/components/main.tsx
vendored
@ -354,6 +354,7 @@ export class Main extends Component<any, MainState> {
|
|||||||
|
|
||||||
nextPage(i: Main) {
|
nextPage(i: Main) {
|
||||||
i.state.page++;
|
i.state.page++;
|
||||||
|
i.state.loading = true;
|
||||||
i.setState(i.state);
|
i.setState(i.state);
|
||||||
i.updateUrl();
|
i.updateUrl();
|
||||||
i.fetchPosts();
|
i.fetchPosts();
|
||||||
@ -361,6 +362,7 @@ export class Main extends Component<any, MainState> {
|
|||||||
|
|
||||||
prevPage(i: Main) {
|
prevPage(i: Main) {
|
||||||
i.state.page--;
|
i.state.page--;
|
||||||
|
i.state.loading = true;
|
||||||
i.setState(i.state);
|
i.setState(i.state);
|
||||||
i.updateUrl();
|
i.updateUrl();
|
||||||
i.fetchPosts();
|
i.fetchPosts();
|
||||||
@ -369,6 +371,7 @@ export class Main extends Component<any, MainState> {
|
|||||||
handleSortChange(i: Main, event: any) {
|
handleSortChange(i: Main, event: any) {
|
||||||
i.state.sort = Number(event.target.value);
|
i.state.sort = Number(event.target.value);
|
||||||
i.state.page = 1;
|
i.state.page = 1;
|
||||||
|
i.state.loading = true;
|
||||||
i.setState(i.state);
|
i.setState(i.state);
|
||||||
i.updateUrl();
|
i.updateUrl();
|
||||||
i.fetchPosts();
|
i.fetchPosts();
|
||||||
@ -377,6 +380,7 @@ export class Main extends Component<any, MainState> {
|
|||||||
handleTypeChange(i: Main, event: any) {
|
handleTypeChange(i: Main, event: any) {
|
||||||
i.state.type_ = Number(event.target.value);
|
i.state.type_ = Number(event.target.value);
|
||||||
i.state.page = 1;
|
i.state.page = 1;
|
||||||
|
i.state.loading = true;
|
||||||
i.setState(i.state);
|
i.setState(i.state);
|
||||||
i.updateUrl();
|
i.updateUrl();
|
||||||
i.fetchPosts();
|
i.fetchPosts();
|
||||||
|
Loading…
Reference in New Issue
Block a user