protected override async Task OnAfterRenderAsync(bool firstRender) { if (firstRender) { await MediaQueryList.Initialize(this); } }
public async ValueTask DisposeAsync() { if (MediaQueryList == null) { return; } await MediaQueryList.RemoveQuery(this); }
protected override void OnInitialized() { if (MediaQueryList == null) { throw new Exception("MediaQueryList is null. The MediaQueryList component should be added to the root or MainLayout of your applicaiton."); } else { MediaQueryList.AddQuery(this); } }
public void Dispose() { MediaQueryList.RemoveQuery(this); }
public async ValueTask DisposeAsync() { await MediaQueryList.RemoveQuery(this); }