-
Notifications
You must be signed in to change notification settings - Fork 101
Expand file tree
/
Copy pathJsonTreeViewExample1.razor
More file actions
54 lines (52 loc) · 1.61 KB
/
JsonTreeViewExample1.razor
File metadata and controls
54 lines (52 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
@namespace MudExtensions.Docs.Examples
@using MudBlazor.Utilities
<MudGrid>
<MudItem lg="6" sm="12" Class="d-flex align-center flex-wrap">
<MudJsonTreeView Json="@_json" Dense="@_dense" />
</MudItem>
<MudItem lg="6" sm="12" Class="d-flex align-center flex-wrap">
<MudGrid>
<MudItem xs="12">
<MudSwitchM3 @bind-Value="@_dense" Label="Dense" Color="Color.Secondary" />
</MudItem>
<MudItem xs="12">
<MudTextField @bind-Value="@_json" Lines="20" Label="Json Data" Variant="Variant.Outlined" />
</MudItem>
</MudGrid>
</MudItem>
</MudGrid>
@code
{
bool _dense = true;
string? _json = @"
{
'PatientRecordType': 'v4.0.8',
'DoctorId': '8F704CD5-3CCE-4CC0-957C-2BC98DC06E42',
'PatientId': '0000-0002-6',
'Birthdate': '1980-02-15T00:00:00Z',
'UpdateDate': '2023-02-14T07:12:27.2502767-05:00',
'Races': [
'Vietnamese',
'Caucasian'
],
'Family': {
'PatientRecordType': 'v4.0.8',
'DoctorId': '8F704CD5-3CCE-4CC0-957C-2BC98DC06E42',
'PatientId': '0000-0002-7',
'Birthdate': '2003-06-12T00:00:00Z',
'UpdateDate': '2025-03-18T07:12:27.2502767-05:00',
'Races': [
'Caucasian'
],
'Family': null,
'Status': 'AV',
'Gender': 'F',
'Active': false,
'Type': 'Normal'
},
'Status': 'AV',
'Gender': 'M',
'Active': true,
'Type': 'Normal'
}".Replace("'", "\"");
}