Merge pull request #2598 from sbwalker/dev

improve initialization logic in FileManager which could sometimes result in Upload button not being displayed when the component was initially loaded
This commit is contained in:
Shaun Walker 2023-02-15 15:05:17 -05:00 committed by GitHub
commit 3952fe5a72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,7 +6,7 @@
@inject IStringLocalizer<FileManager> Localizer
@inject IStringLocalizer<SharedResources> SharedLocalizer
@if (_folders != null)
@if (_initialized)
{
<div id="@Id" class="container-fluid px-0">
<div class="row">
@ -87,6 +87,7 @@
}
@code {
private bool _initialized = false;
private List<Folder> _folders;
private List<File> _files = new List<File>();
private string _fileinputid = string.Empty;
@ -205,6 +206,8 @@
_fileinputid = "FileInput_" + _guid;
_progressinfoid = "ProgressInfo_" + _guid;
_progressbarid = "ProgressBar_" + _guid;
_initialized = true;
}
private async Task GetFiles()