Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
a113c59
Add SelectRowColumn column
dvoituron Apr 26, 2024
81177cd
Including Icons
dvoituron Apr 26, 2024
3e233e2
Update the colum name to SelectColumn and use a EventCallback
dvoituron Apr 26, 2024
ef233bc
Adding TGridItem="Person"
dvoituron Apr 26, 2024
5524506
Add SelectAllChanged
dvoituron Apr 26, 2024
fc2f225
Add a bindable SelectAll property
dvoituron Apr 26, 2024
ac38417
Remove AllSelected demo var
dvoituron Apr 26, 2024
888a78e
Merge branch 'dev' into users/datagrid/multi-select
dvoituron Apr 26, 2024
696923e
Merge branch 'dev' into users/datagrid/multi-select
vnbaaij Apr 26, 2024
4bf3bbf
Add Style
dvoituron Apr 26, 2024
0b38e8c
Fix the sample
dvoituron Apr 26, 2024
f110762
Merge branch 'users/datagrid/multi-select' of github.amrom.workers.dev-perso:micros…
dvoituron Apr 26, 2024
cbfe3c1
Add IconIndeterminate
dvoituron Apr 26, 2024
0b47a07
Replace by IEnumerable
dvoituron Apr 26, 2024
5ed9696
Add DataGridSelectMode.Single
dvoituron Apr 26, 2024
50068f9
Merge branch 'dev' into users/datagrid/multi-select
dvoituron Apr 28, 2024
c8daac0
Separated the SelectedItems and Property / OnSelect (not yet completed)
dvoituron Apr 28, 2024
fc271b7
Update
dvoituron Apr 28, 2024
1b83879
Update the 2 examples
dvoituron Apr 28, 2024
0229a57
Add Titles
dvoituron Apr 28, 2024
489af95
Add OnRowDoubleClick
dvoituron Apr 28, 2024
3c1a8ac
Add Enter key
dvoituron Apr 28, 2024
04881be
Update keys to select/unselect
dvoituron Apr 28, 2024
5c87496
Merge branch 'dev' into users/datagrid/multi-select
dvoituron Apr 28, 2024
d360e7e
Update doc
dvoituron Apr 28, 2024
323f2c3
Add first Unit Test
dvoituron Apr 29, 2024
e275763
Add Unit Tests
dvoituron Apr 29, 2024
56d3a89
Add Unit Tests for Property attribute
dvoituron Apr 29, 2024
4f3e2cc
Merge branch 'dev' into users/datagrid/multi-select
dvoituron Apr 29, 2024
cf19e3f
Add SwitchMultiToSingleSelect
dvoituron Apr 29, 2024
6473d6e
Update the doc
dvoituron Apr 29, 2024
c927720
Update Single Icons and Doc (PR comments)
dvoituron Apr 30, 2024
1ae2d38
Merge branch 'dev' into users/datagrid/multi-select
vnbaaij Apr 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Including Icons
  • Loading branch information
dvoituron committed Apr 26, 2024
commit 81177cd5d44a2f606dd4f7ef1094282ca3f85dd9
12 changes: 6 additions & 6 deletions examples/Demo/Shared/Pages/DataGrid/DataGridPage.razor
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@

<PageTitle>@App.PageTitle("DataGrid")</PageTitle>

<DemoSection Title="Multi Select" Component="@typeof(DataGridMultiSelect)">
<Description>
Example ...
</Description>
</DemoSection>

<h1>Data grid</h1>
<p>
The <code>&lt;FluentDataGrid&gt;</code> component is used to display tabular data. The <code>&lt;FluentDataGridRow&gt;</code>
Expand Down Expand Up @@ -59,6 +53,12 @@
</Description>
</DemoSection>

<DemoSection Title="Multi Select" Component="@typeof(DataGridMultiSelect)">
<Description>
The same example, adding a <code>SelectRowColumn</code> column, to allow multi-select rows.
</Description>
</DemoSection>

<DemoSection Title="Typical usage" Component="@typeof(DataGridTypical)" CollocatedFiles="@(new[] {"css"})">
<Description>
<p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<FluentDataGrid Items="@people" ShowHover="true" TGridItem="Person">
<SelectRowColumn Property="@(p => p.Selected)" SelectChanged="@(e => e.Selected = !e.Selected)" IconChecked="@(new Icons.Filled.Size20.CheckmarkCircle())" IconUnchecked="@(new Icons.Regular.Size20.Circle())" />
<SelectRowColumn Property="@(p => p.Selected)" SelectChanged="@(e => e.Selected = !e.Selected)" />
<PropertyColumn Width="100px" Property="@(p => p.PersonId)" Title="ID" />
<PropertyColumn Width="300px" Property="@(p => p.Name)" />
<PropertyColumn Width="150px" Property="@(p => p.BirthDate)" Format="yyyy-MM-dd" Sortable="true" />
Expand Down
4 changes: 2 additions & 2 deletions src/Core/Components/DataGrid/Columns/SelectRowColumn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ public SelectRowColumn()
/// Gets or sets the Icon to be rendered when the row is non selected.
/// </summary>
[Parameter]
public required Icon IconUnchecked { get; set; } //= new Icons.Regular.Size20.Circle();
public required Icon IconUnchecked { get; set; } = new CoreIcons.Regular.Size20.CheckboxUnchecked().WithColor(Color.FillInverse);

/// <summary>
/// Gets or sets the Icon to be rendered when the row is selected.
/// </summary>
[Parameter]
public required Icon IconChecked { get; set; } //= new Icons.Regular.Size20.Circle();
public required Icon IconChecked { get; set; } = new CoreIcons.Filled.Size20.CheckboxChecked();

/// <summary>
/// Gets or sets the action to be executed when the row is selected or unselected.
Expand Down
2 changes: 2 additions & 0 deletions src/Core/Components/Icons/CoreIcons.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public class CheckmarkCircle : Icon { public CheckmarkCircle() : base("Checkmark
public class DismissCircle : Icon { public DismissCircle() : base("DismissCircle", IconVariant.Filled, IconSize.Size20, "<path d=\"M10 2a8 8 0 1 1 0 16 8 8 0 0 1 0-16ZM7.8 7.11a.5.5 0 0 0-.63.06l-.06.07a.5.5 0 0 0 .06.64L9.3 10l-2.12 2.12-.06.07a.5.5 0 0 0 .06.64l.07.06c.2.13.47.11.64-.06L10 10.7l2.12 2.12.07.06c.2.13.46.11.64-.06l.06-.07a.5.5 0 0 0-.06-.64L10.7 10l2.12-2.12.06-.07a.5.5 0 0 0-.06-.64l-.07-.06a.5.5 0 0 0-.64.06L10 9.3 7.88 7.17l-.07-.06Z\"/>") { } }
public class Info : Icon { public Info() : base("Info", IconVariant.Filled, IconSize.Size20, "<path d=\"M18 10a8 8 0 1 0-16 0 8 8 0 0 0 16 0ZM9.5 8.91a.5.5 0 0 1 1 0V13.6a.5.5 0 0 1-1 0V8.9Zm-.25-2.16a.75.75 0 1 1 1.5 0 .75.75 0 0 1-1.5 0Z\"/>") { } }
public class Warning : Icon { public Warning() : base("Warning", IconVariant.Filled, IconSize.Size20, "<path d=\"M8.68 2.79a1.5 1.5 0 0 1 2.64 0l6.5 12A1.5 1.5 0 0 1 16.5 17h-13a1.5 1.5 0 0 1-1.32-2.21l6.5-12ZM10.5 7.5a.5.5 0 0 0-1 0v4a.5.5 0 0 0 1 0v-4Zm.25 6.25a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Z\"/>") { } }
public class CheckboxChecked : Icon { public CheckboxChecked() : base("CheckboxChecked", IconVariant.Filled, IconSize.Size20, "<path d=\"M6 3a3 3 0 0 0-3 3v8a3 3 0 0 0 3 3h8a3 3 0 0 0 3-3V6a3 3 0 0 0-3-3H6Zm7.85 4.85-5 5a.5.5 0 0 1-.7 0l-2-2a.5.5 0 0 1 .7-.7l1.65 1.64 4.65-4.64a.5.5 0 0 1 .7.7Z\" />") { } }
}
}

Expand Down Expand Up @@ -94,6 +95,7 @@ public class ChevronDoubleLeft : Icon { public ChevronDoubleLeft() : base("Chevr
public class ChevronDoubleRight : Icon { public ChevronDoubleRight() : base("ChevronDoubleRight", IconVariant.Regular, IconSize.Size20, "<path d=\"M8.65 4.15c.2-.2.5-.2.7 0l5.49 5.46c.21.22.21.57 0 .78l-5.49 5.46a.5.5 0 0 1-.7-.7L13.8 10 8.65 4.85a.5.5 0 0 1 0-.7Zm-4 0c.2-.2.5-.2.7 0l5.49 5.46c.21.22.21.57 0 .78l-5.49 5.46a.5.5 0 0 1-.7-.7L9.8 10 4.65 4.85a.5.5 0 0 1 0-.7Z\"/>") { } }
public class Dismiss : Icon { public Dismiss() : base("Dismiss", IconVariant.Regular, IconSize.Size20, "<path d=\"m4.09 4.22.06-.07a.5.5 0 0 1 .63-.06l.07.06L10 9.29l5.15-5.14a.5.5 0 0 1 .63-.06l.07.06c.18.17.2.44.06.63l-.06.07L10.71 10l5.14 5.15c.18.17.2.44.06.63l-.06.07a.5.5 0 0 1-.63.06l-.07-.06L10 10.71l-5.15 5.14a.5.5 0 0 1-.63.06l-.07-.06a.5.5 0 0 1-.06-.63l.06-.07L9.29 10 4.15 4.85a.5.5 0 0 1-.06-.63l.06-.07-.06.07Z\"/>") { } }
public class DismissCircle : Icon { public DismissCircle() : base("DismissCircle", IconVariant.Regular, IconSize.Size20, "<path d=\"M10 2a8 8 0 1 1 0 16 8 8 0 0 1 0-16Zm0 1a7 7 0 1 0 0 14 7 7 0 0 0 0-14ZM7.8 7.11l.08.06L10 9.3l2.12-2.12a.5.5 0 0 1 .64-.06l.07.06c.17.18.2.44.06.64l-.06.07L10.7 10l2.12 2.12c.17.17.2.44.06.64l-.06.07a.5.5 0 0 1-.64.06l-.07-.06L10 10.7l-2.12 2.12a.5.5 0 0 1-.64.06l-.07-.06a.5.5 0 0 1-.06-.64l.06-.07L9.3 10 7.17 7.88a.5.5 0 0 1-.06-.64l.06-.07a.5.5 0 0 1 .64-.06Z\"/>") { } }
public class CheckboxUnchecked : Icon { public CheckboxUnchecked() : base("CheckboxUnchecked", IconVariant.Regular, IconSize.Size20, "<path d=\"M3 6a3 3 0 0 1 3-3h8a3 3 0 0 1 3 3v8a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3V6Zm3-2a2 2 0 0 0-2 2v8c0 1.1.9 2 2 2h8a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2H6Z\" />") { } }
}
}

Expand Down