DEV: Add loading spinner (#20)
* WIP: Add loading spinner * DEV: Linting fixes * DEV: Make `loading` a `@tracked` property
This commit is contained in:
parent
20bcb38249
commit
be968d9158
|
@ -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() {
|
||||
|
|
|
@ -20,11 +20,13 @@
|
|||
</div>
|
||||
{{/if}}
|
||||
|
||||
<div
|
||||
{{did-insert this.createSpreadsheet}}
|
||||
tabindex="1"
|
||||
class="jexcel_container"
|
||||
></div>
|
||||
<ConditionalLoadingSpinner @condition={{this.loading}}>
|
||||
<div
|
||||
{{did-insert this.createSpreadsheet}}
|
||||
tabindex="1"
|
||||
class="jexcel_container"
|
||||
></div>
|
||||
</ConditionalLoadingSpinner>
|
||||
</DModalBody>
|
||||
|
||||
<div class="modal-footer">
|
||||
|
|
Loading…
Reference in New Issue