public async Task ToggleCollapse() { this.Collapsed = !this.Collapsed; await OnCollapse.InvokeAsync(Collapsed); OnCollapsed?.Invoke(this.Collapsed); }
public async Task WatchMatchMedia() { if (string.IsNullOrEmpty(Breakpoint)) { return; } bool matchBelow = await JsInvokeAsync <bool>(JSInteropConstants.matchMedia, $"(max-width: {_dimensionMap[Breakpoint]})"); this.Below = matchBelow; this.Collapsed = matchBelow; await this.OnCollapsedChange.InvokeAsync(matchBelow); OnCollapsed?.Invoke(this.Collapsed); }