diff --git a/src/BlazorStrap-Docs/wwwroot/Samples/V4/Content/Tables/Tables3.md b/src/BlazorStrap-Docs/wwwroot/Samples/V4/Content/Tables/Tables3.md index 5cfa8c0b..088a8a26 100644 --- a/src/BlazorStrap-Docs/wwwroot/Samples/V4/Content/Tables/Tables3.md +++ b/src/BlazorStrap-Docs/wwwroot/Samples/V4/Content/Tables/Tables3.md @@ -37,7 +37,6 @@ private void OnChange(DataRequest dataRequest) { - Console.WriteLine(dataRequest.Descending); _count = _model.DataSet.Count(); if (dataRequest.FilterColumnProperty != null && dataRequest.Filter != null) { diff --git a/src/BlazorStrap/BlazorStrap.csproj b/src/BlazorStrap/BlazorStrap.csproj index 96870262..ba841bd8 100644 --- a/src/BlazorStrap/BlazorStrap.csproj +++ b/src/BlazorStrap/BlazorStrap.csproj @@ -13,7 +13,7 @@ https://blazorstrap.io/ https://github.com/chanan/BlazorStrap BlazorStrap - 5.1.102 + 5.1.102.50923 diff --git a/src/BlazorStrap/Shared/Components/Common/BSCollapseBase.cs b/src/BlazorStrap/Shared/Components/Common/BSCollapseBase.cs index 01321de0..ced44d4f 100644 --- a/src/BlazorStrap/Shared/Components/Common/BSCollapseBase.cs +++ b/src/BlazorStrap/Shared/Components/Common/BSCollapseBase.cs @@ -96,8 +96,7 @@ public override async Task ShowAsync() { await BlazorStrapService.Interop.AnimateCollapseAsync(_objectRef, MyRef, DataId, true); } - await BlazorStrapService.Interop.WaitForTransitionEnd(MyRef, 400); - await Task.Delay(50); + await BlazorStrapService.Interop.WaitForTransitionEnd(MyRef, 500); await BlazorStrapService.Interop.SetStyleAsync(MyRef, "height", ""); } } @@ -105,10 +104,10 @@ public override async Task ShowAsync() { } _shown = true; + CanRefresh = true; await InvokeAsync(StateHasChanged); _ = Task.Run(() => { _ = OnShown.InvokeAsync(this); }); taskSource.SetResult(true); - CanRefresh = true; }; _eventQue.Add(new EventQue { TaskSource = taskSource, Func = func}); @@ -122,7 +121,6 @@ public override async Task ShowAsync() public override async Task HideAsync() { - if (!_shown) return ; _ = Task.Run(() => { _ = OnHide.InvokeAsync(this); }); //Kick off to event que @@ -138,12 +136,12 @@ public override async Task HideAsync() if (IsHorizontal) { await BlazorStrapService.Interop.AnimateHorizontalCollapseAsync(_objectRef, MyRef, DataId, false); - await BlazorStrapService.Interop.WaitForTransitionEnd(MyRef, 400); + await BlazorStrapService.Interop.WaitForTransitionEnd(MyRef, 500); } else { await BlazorStrapService.Interop.AnimateCollapseAsync(_objectRef, MyRef, DataId, false); - await BlazorStrapService.Interop.WaitForTransitionEnd(MyRef, 400); + await BlazorStrapService.Interop.WaitForTransitionEnd(MyRef, 500); } } } @@ -151,11 +149,11 @@ public override async Task HideAsync() { } + CanRefresh = true; _shown = false; await InvokeAsync(StateHasChanged); _ = Task.Run(() => { _ = OnHidden.InvokeAsync(this); }); taskSource.SetResult(true); - CanRefresh = true; }; _eventQue.Add(new EventQue { TaskSource = taskSource, Func = func }); @@ -186,7 +184,6 @@ protected override async Task OnAfterRenderAsync(bool firstRender) { if (!firstRender) { - _hasRendered = true; if (_eventQue.Count > 0) { var eventItem = _eventQue.First(); @@ -199,6 +196,7 @@ protected override async Task OnAfterRenderAsync(bool firstRender) } else { + _hasRendered = true; _objectRef = DotNetObjectReference.Create(this); } }