Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the sort header in the table #501

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
56 changes: 28 additions & 28 deletions src/MatBlazor.Demo/Demo/DemoEditContext.razor
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,17 @@
</p>

<p>
<MatSelect Label="Select" @bind-Value="myModel.Sex">
<MatSelect Label="Select" @bind-Value="myModel.Gender">
<MatOptionString Value=""></MatOptionString>
<MatOptionString Value="M">M</MatOptionString>
<MatOptionString Value="W">W</MatOptionString>
</MatSelect>
</p>
<p>
<MatSelectItem Label="SelectItem" @bind-Value="@myModel.Sex" Items="@SexItems"></MatSelectItem>
<MatSelectItem Label="SelectItem" @bind-Value="@myModel.Gender" Items="@GenderItems"></MatSelectItem>
</p>
<p>
<MatSelectValue Label="SelectValue" @bind-Value="@myModel.Sex" Items="@SexItems" ValueSelector="@(v => v)"></MatSelectValue>
<MatSelectValue Label="SelectValue" @bind-Value="@myModel.Gender" Items="@GenderItems" ValueSelector="@(v => v)"></MatSelectValue>
</p>

<MatDivider/>
Expand All @@ -60,7 +60,7 @@
HelperText="ValidationDisabled" HelperTextPersistent="true"/>
</p>
<p>
<MatSelectItem Label="SelectItem" Value="@myModel.Sex" Items="@SexItems" ValidationDisabled="true" HelperText="ValidationDisabled"></MatSelectItem>
<MatSelectItem Label="SelectItem" Value="@myModel.Gender" Items="@GenderItems" ValidationDisabled="true" HelperText="ValidationDisabled"></MatSelectItem>
</p>

<ValidationSummary/>
Expand Down Expand Up @@ -97,20 +97,20 @@
<ValidationMessage For="@(() => myModel.EndDate)"/>
</p>
<p>
<MatSelect Label="Select" @bind-Value="myModel.Sex">
<MatSelect Label="Select" @bind-Value="myModel.Gender">
<MatOptionString Value=""></MatOptionString>
<MatOptionString Value="M">M</MatOptionString>
<MatOptionString Value="W">W</MatOptionString>
</MatSelect>
<ValidationMessage For="@(() => myModel.Sex)"/>
<ValidationMessage For="@(() => myModel.Gender)"/>
</p>
<p>
<MatSelectItem Label="SelectItem" @bind-Value="@myModel.Sex" Items="@SexItems"></MatSelectItem>
<ValidationMessage For="@(() => myModel.Sex)"/>
<MatSelectItem Label="SelectItem" @bind-Value="@myModel.Gender" Items="@GenderItems"></MatSelectItem>
<ValidationMessage For="@(() => myModel.Gender)"/>
</p>
<p>
<MatSelectValue Label="SelectValue" @bind-Value="@myModel.Sex" Items="@SexItems" ValueSelector="@(v => v)"></MatSelectValue>
<ValidationMessage For="@(() => myModel.Sex)"/>
<MatSelectValue Label="SelectValue" @bind-Value="@myModel.Gender" Items="@GenderItems" ValueSelector="@(v => v)"></MatSelectValue>
<ValidationMessage For="@(() => myModel.Gender)"/>
</p>


Expand All @@ -132,17 +132,17 @@
@code {


class SexDef
class GenderDef
{
public string Name { get; set; }

public SexDef(string name)
public GenderDef(string name)
{
Name = name;
}
}

string[] SexItems = new[]
string[] GenderItems = new[]
{
"",
"M",
Expand Down Expand Up @@ -177,7 +177,7 @@
public string Password { get; set; }

[Required]
public string Sex { get; set; }
public string Gender { get; set; }

[Required]
[CustomValidation(typeof(LoginModel), nameof(RequiredDateTime))]
Expand Down Expand Up @@ -250,17 +250,17 @@
</p>

<p>
<MatSelect Label=""Select"" @bind-Value=""myModel.Sex"">
<MatSelect Label=""Select"" @bind-Value=""myModel.Gender"">
<MatOptionString Value=""""></MatOptionString>
<MatOptionString Value=""M"">M</MatOptionString>
<MatOptionString Value=""W"">W</MatOptionString>
</MatSelect>
</p>
<p>
<MatSelectItem Label=""SelectItem"" @bind-Value=""@myModel.Sex"" Items=""@SexItems""></MatSelectItem>
<MatSelectItem Label=""SelectItem"" @bind-Value=""@myModel.Gender"" Items=""@GenderItems""></MatSelectItem>
</p>
<p>
<MatSelectValue Label=""SelectValue"" @bind-Value=""@myModel.Sex"" Items=""@SexItems"" ValueSelector=""@(v => v)""></MatSelectValue>
<MatSelectValue Label=""SelectValue"" @bind-Value=""@myModel.Gender"" Items=""@GenderItems"" ValueSelector=""@(v => v)""></MatSelectValue>
</p>

<MatDivider/>
Expand All @@ -270,7 +270,7 @@
HelperText=""ValidationDisabled"" HelperTextPersistent=""true""/>
</p>
<p>
<MatSelectItem Label=""SelectItem"" Value=""@myModel.Sex"" Items=""@SexItems"" ValidationDisabled=""true"" HelperText=""ValidationDisabled""></MatSelectItem>
<MatSelectItem Label=""SelectItem"" Value=""@myModel.Gender"" Items=""@GenderItems"" ValidationDisabled=""true"" HelperText=""ValidationDisabled""></MatSelectItem>
</p>

<ValidationSummary/>
Expand Down Expand Up @@ -307,20 +307,20 @@
<ValidationMessage For=""@(() => myModel.EndDate)""/>
</p>
<p>
<MatSelect Label=""Select"" @bind-Value=""myModel.Sex"">
<MatSelect Label=""Select"" @bind-Value=""myModel.Gender"">
<MatOptionString Value=""""></MatOptionString>
<MatOptionString Value=""M"">M</MatOptionString>
<MatOptionString Value=""W"">W</MatOptionString>
</MatSelect>
<ValidationMessage For=""@(() => myModel.Sex)""/>
<ValidationMessage For=""@(() => myModel.Gender)""/>
</p>
<p>
<MatSelectItem Label=""SelectItem"" @bind-Value=""@myModel.Sex"" Items=""@SexItems""></MatSelectItem>
<ValidationMessage For=""@(() => myModel.Sex)""/>
<MatSelectItem Label=""SelectItem"" @bind-Value=""@myModel.Gender"" Items=""@GenderItems""></MatSelectItem>
<ValidationMessage For=""@(() => myModel.Gender)""/>
</p>
<p>
<MatSelectValue Label=""SelectValue"" @bind-Value=""@myModel.Sex"" Items=""@SexItems"" ValueSelector=""@(v => v)""></MatSelectValue>
<ValidationMessage For=""@(() => myModel.Sex)""/>
<MatSelectValue Label=""SelectValue"" @bind-Value=""@myModel.Gender"" Items=""@GenderItems"" ValueSelector=""@(v => v)""></MatSelectValue>
<ValidationMessage For=""@(() => myModel.Gender)""/>
</p>


Expand All @@ -342,17 +342,17 @@
@code {


class SexDef
class GenderDef
{
public string Name { get; set; }

public SexDef(string name)
public GenderDef(string name)
{
Name = name;
}
}

string[] SexItems = new[]
string[] GenderItems = new[]
{
"""",
""M"",
Expand Down Expand Up @@ -387,7 +387,7 @@
public string Password { get; set; }

[Required]
public string Sex { get; set; }
public string Gender { get; set; }

[Required]
[CustomValidation(typeof(LoginModel), nameof(RequiredDateTime))]
Expand Down
6 changes: 3 additions & 3 deletions src/MatBlazor.Demo/Demo/DemoMatCard.razor
Original file line number Diff line number Diff line change
Expand Up @@ -269,11 +269,11 @@
</DemoContainer>


<MatH5>Material Design Card example with header</MatH5>
<MatH5>Material Design Card example with header and outlined(Unelevated)</MatH5>

<DemoContainer>
<Content>
<MatCard class="demo-mat-card">
<MatCard class="demo-mat-card" Outlined="true">
<div class="demo-mat-card-content">
<MatHeadline6 class="demo-mat-card-clean-margin">
Our Changing Planet
Expand Down Expand Up @@ -303,7 +303,7 @@
</Content>
<SourceContent>
<BlazorFiddle Template="MatBlazor" Code=@(@"
<MatCard class=""demo-mat-card"">
<MatCard class=""demo-mat-card"" Outlined=""true"">
<div class=""demo-mat-card-content"">
<MatHeadline6 class=""demo-mat-card-clean-margin"">
Our Changing Planet
Expand Down
12 changes: 6 additions & 6 deletions src/MatBlazor.Demo/Demo/DemoMatRadioButton.razor
Original file line number Diff line number Diff line change
Expand Up @@ -218,15 +218,15 @@
<h5 class="mat-h5">Enum</h5>
<DemoContainer>
<Content>
<MatRadioGroup @bind-Value="@sex" Items="@(Enum.GetValues(typeof(Sex)).Cast<Sex>())">
<MatRadioGroup @bind-Value="@gender" Items="@(Enum.GetValues(typeof(Gender)).Cast<Gender>())">
</MatRadioGroup>


@code
{
Sex sex;
Gender gender;

enum Sex
enum Gender
{
None,
Male,
Expand All @@ -239,15 +239,15 @@
</Content>
<SourceContent>
<BlazorFiddle Template="MatBlazor" Code=@(@"
<MatRadioGroup @bind-Value=""@sex"" Items=""@(Enum.GetValues(typeof(Sex)).Cast<Sex>())"">
<MatRadioGroup @bind-Value=""@gender"" Items=""@(Enum.GetValues(typeof(Gender)).Cast<Gender>())"">
</MatRadioGroup>


@code
{
Sex sex;
Gender gender;

enum Sex
enum Gender
{
None,
Male,
Expand Down
Loading