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;
|
@tracked showEditReason = false;
|
||||||
spreadsheet = null;
|
spreadsheet = null;
|
||||||
defaultColWidth = 150;
|
defaultColWidth = 150;
|
||||||
|
@tracked loading = null;
|
||||||
|
|
||||||
// Getters:
|
// Getters:
|
||||||
get isEditingTable() {
|
get isEditingTable() {
|
||||||
|
@ -92,9 +93,12 @@ export default class SpreadsheetEditor extends Component {
|
||||||
|
|
||||||
// Helper Methods:
|
// Helper Methods:
|
||||||
loadLibraries() {
|
loadLibraries() {
|
||||||
return loadScript(settings.theme_uploads_local.jsuites).then(() => {
|
this.loading = true;
|
||||||
return loadScript(settings.theme_uploads_local.jspreadsheet);
|
return loadScript(settings.theme_uploads_local.jsuites)
|
||||||
});
|
.then(() => {
|
||||||
|
return loadScript(settings.theme_uploads_local.jspreadsheet);
|
||||||
|
})
|
||||||
|
.finally(() => (this.loading = false));
|
||||||
}
|
}
|
||||||
|
|
||||||
buildNewTable() {
|
buildNewTable() {
|
||||||
|
|
|
@ -20,11 +20,13 @@
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<div
|
<ConditionalLoadingSpinner @condition={{this.loading}}>
|
||||||
{{did-insert this.createSpreadsheet}}
|
<div
|
||||||
tabindex="1"
|
{{did-insert this.createSpreadsheet}}
|
||||||
class="jexcel_container"
|
tabindex="1"
|
||||||
></div>
|
class="jexcel_container"
|
||||||
|
></div>
|
||||||
|
</ConditionalLoadingSpinner>
|
||||||
</DModalBody>
|
</DModalBody>
|
||||||
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
|
|
Loading…
Reference in New Issue