Web: Settings: Backup: Added possibility to set loading for outside components.
This commit is contained in:
parent
84d9eebce9
commit
c24fe6a9ab
@ -43,14 +43,19 @@ class ThirdPartyStorageModule extends React.PureComponent {
|
||||
};
|
||||
}
|
||||
componentDidMount() {
|
||||
const { onSetLoadingData } = this.props;
|
||||
this.setState(
|
||||
{
|
||||
isLoading: true,
|
||||
},
|
||||
function () {
|
||||
onSetLoadingData && onSetLoadingData(true);
|
||||
getBackupStorage()
|
||||
.then((storageBackup) => this.getOptions(storageBackup))
|
||||
.finally(() => this.setState({ isLoading: false }));
|
||||
.finally(() => {
|
||||
onSetLoadingData && onSetLoadingData(false);
|
||||
this.setState({ isLoading: false });
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user