public void ChangeNodeSelection() { StateHasChanged(); var selectedNodes = callNodeSelectionChange(TreeNodes, new List <string>()); OnNodeSelectionChange.InvokeAsync(selectedNodes); var allSelected = TreeNodes.AreAllSelected(new List <bool>()); if (allSelected) { _toggleAll = true; } else { _toggleAll = false; } StateHasChanged(); }