diff --git a/javascripts/discourse/components/spreadsheet-editor.js b/javascripts/discourse/components/spreadsheet-editor.js index 9a35ec8..326917c 100644 --- a/javascripts/discourse/components/spreadsheet-editor.js +++ b/javascripts/discourse/components/spreadsheet-editor.js @@ -16,6 +16,7 @@ export default class SpreadsheetEditor extends Component { @tracked showEditReason = false; spreadsheet = null; defaultColWidth = 150; + @tracked loading = null; // Getters: get isEditingTable() { @@ -92,9 +93,12 @@ export default class SpreadsheetEditor extends Component { // Helper Methods: loadLibraries() { - return loadScript(settings.theme_uploads_local.jsuites).then(() => { - return loadScript(settings.theme_uploads_local.jspreadsheet); - }); + this.loading = true; + return loadScript(settings.theme_uploads_local.jsuites) + .then(() => { + return loadScript(settings.theme_uploads_local.jspreadsheet); + }) + .finally(() => (this.loading = false)); } buildNewTable() { diff --git a/javascripts/discourse/templates/components/spreadsheet-editor.hbs b/javascripts/discourse/templates/components/spreadsheet-editor.hbs index b748e0b..044197a 100644 --- a/javascripts/discourse/templates/components/spreadsheet-editor.hbs +++ b/javascripts/discourse/templates/components/spreadsheet-editor.hbs @@ -20,11 +20,13 @@ {{/if}} -
+