mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-17 14:37:58 +00:00
[shared dir view] display the loading icon in the content area when the users visit a folder (#7676)
This commit is contained in:
parent
796600eef6
commit
872ae595b8
@ -141,6 +141,7 @@ class SharedDirView extends React.Component {
|
|||||||
listItems = () => {
|
listItems = () => {
|
||||||
const { path, currentMode } = this.state;
|
const { path, currentMode } = this.state;
|
||||||
const thumbnailSize = currentMode == LIST_MODE ? thumbnailDefaultSize : thumbnailSizeForGrid;
|
const thumbnailSize = currentMode == LIST_MODE ? thumbnailDefaultSize : thumbnailSizeForGrid;
|
||||||
|
this.setState({ isLoading: true });
|
||||||
seafileAPI.listSharedDir(token, path, thumbnailSize).then((res) => {
|
seafileAPI.listSharedDir(token, path, thumbnailSize).then((res) => {
|
||||||
const items = res.data['dirent_list'].map(item => {
|
const items = res.data['dirent_list'].map(item => {
|
||||||
item.isSelected = false;
|
item.isSelected = false;
|
||||||
@ -639,8 +640,7 @@ class SharedDirView extends React.Component {
|
|||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
this.setState({
|
this.setState({
|
||||||
currentMode: mode,
|
currentMode: mode
|
||||||
isLoading: true
|
|
||||||
}, () => {
|
}, () => {
|
||||||
this.listItems();
|
this.listItems();
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user