@page "/"
@using Blazorise.TreeView
Accounts
@code {
public partial class Accounts {
private List account = new List();
account.Add(new Accounts {AccountName = "Hubspot"});
private string? newAccount;
private string? AccountName { get; set;};
}
private List task = new List();
account.Add(new Tasks {TaskName = "Call By Today"});
private string? newTask { get; set;};
private void AddAccount()
{
if (!string.IsNullOrWhiteSpace(newAccount))
{
account.Add(new Accounts { AccountName = newAccount });
newAccount = string.Empty;
}
}
private void AddTask()
{
if (!string.IsNullOrWhiteSpace(newTask))
{
task.Add(new Tasks { TaskName = newTask });
newTask = string.Empty;
}
}
IEnumerable Tasks = new[]
{
new Accounts {
AccountName = "Hubspot"
Tasks = new[]
{
new Tasks {
TaskName = "Call Today"
},
}
},
};
//IList ExpandedNodes = new List();
//Accounts selectedNode;
}