TagSpaces is an offline, open source, document manager with tagging support
lazy loading of the thirparty libs content
Ilian Sapundshievc237b545f47a
diff --git a/app/components/dialogs/ThirdPartyLibsDialog.js b/app/components/dialogs/ThirdPartyLibsDialog.jsindex 521329189..e4119d1bc 100644--- a/app/components/dialogs/ThirdPartyLibsDialog.js+++ b/app/components/dialogs/ThirdPartyLibsDialog.js@@ -42,20 +42,22 @@ type State = {class ThirdPartyLibsDialog extends React.Component<Props, State> {state = {- thirdpartylibs: ''+ thirdpartylibs: 'Loading content ...'};- componentWillMount() {- loadFileContentPromise(thirdpartylibsUrl, 'text').then(- (result) => {- this.setState({- thirdpartylibs: result- });- return true;- }- ).catch((err) => {- console.log('Error loading third party libs file ' + err);- });+ componentWillReceiveProps(nextProps) {+ if (nextProps.open) {+ loadFileContentPromise(thirdpartylibsUrl, 'text').then(+ (result) => {+ this.setState({+ thirdpartylibs: result+ });+ return true;+ }+ ).catch((err) => {+ console.log('Error loading third party libs file ' + err);+ });+ }}renderTitle = () => <DialogTitle>{i18n.t('core:thirdPartyLibs')}</DialogTitle>;