From 7490941b523ca10a827709c0a4740de20070cb1b Mon Sep 17 00:00:00 2001
From: FrankH <4848285@qq.com>
Date: Thu, 5 Dec 2019 09:28:09 +0800
Subject: [PATCH 1/5] Update to 3.1
---
Directory.Build.props | 4 ++--
samples/BlazorApp/BlazorApp.csproj | 4 ++--
samples/RazorComponentsApp/RazorComponentsApp.csproj | 4 ++--
.../RazorComponents.MaterialDesign.csproj | 6 +++---
4 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/Directory.Build.props b/Directory.Build.props
index ffb513d..bdbc726 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -1,6 +1,6 @@
- 3.0.0
- 3.0.0-preview9.19465.2
+ 3.1.0
+ 3.1.0-preview4.19579.2
diff --git a/samples/BlazorApp/BlazorApp.csproj b/samples/BlazorApp/BlazorApp.csproj
index 84104a9..0c7df3d 100644
--- a/samples/BlazorApp/BlazorApp.csproj
+++ b/samples/BlazorApp/BlazorApp.csproj
@@ -1,9 +1,9 @@
- netstandard2.0
+ netstandard2.1
Exe
- 7.3
+ 8.0
3.0
diff --git a/samples/RazorComponentsApp/RazorComponentsApp.csproj b/samples/RazorComponentsApp/RazorComponentsApp.csproj
index 6ec7ab4..120a303 100644
--- a/samples/RazorComponentsApp/RazorComponentsApp.csproj
+++ b/samples/RazorComponentsApp/RazorComponentsApp.csproj
@@ -1,8 +1,8 @@
- netcoreapp3.0
- 7.3
+ netcoreapp3.1
+ 8.0
diff --git a/src/RazorComponents.MaterialDesign/RazorComponents.MaterialDesign.csproj b/src/RazorComponents.MaterialDesign/RazorComponents.MaterialDesign.csproj
index e94433d..59798a5 100644
--- a/src/RazorComponents.MaterialDesign/RazorComponents.MaterialDesign.csproj
+++ b/src/RazorComponents.MaterialDesign/RazorComponents.MaterialDesign.csproj
@@ -1,8 +1,8 @@
- netstandard2.0
- 7.3
+ netstandard2.1
+ 8.0
3.0
@@ -13,7 +13,7 @@
- 0.1.0-alpha-$([System.DateTime]::Now.ToString(yyyyMMddhhmmss))
+ 0.1.0-alpha-$([System.DateTime]::Now.ToString(MMddhh))
From 749488ea86afffd04433eb9e29cb068f97a0b3c7 Mon Sep 17 00:00:00 2001
From: FrankH <4848285@qq.com>
Date: Thu, 5 Dec 2019 10:08:16 +0800
Subject: [PATCH 2/5] added TextArea and its sample
---
samples/BlazorApp/Pages/TextFieldSample.razor | 34 +++++++++++++++----
.../MdcTextArea.razor | 23 +++++++++++++
.../RazorComponents.MaterialDesign.csproj | 2 +-
3 files changed, 52 insertions(+), 7 deletions(-)
create mode 100644 src/RazorComponents.MaterialDesign/MdcTextArea.razor
diff --git a/samples/BlazorApp/Pages/TextFieldSample.razor b/samples/BlazorApp/Pages/TextFieldSample.razor
index 5140917..8ab3d2b 100644
--- a/samples/BlazorApp/Pages/TextFieldSample.razor
+++ b/samples/BlazorApp/Pages/TextFieldSample.razor
@@ -4,13 +4,35 @@
See TextField.cshtml for sources.
-
+
+
-@if (currentValue != null)
-{
-
You typed: @currentValue
-}
+ @if (currentText != null)
+ {
+ You typed: @currentText
+ }
+
+
+
+
+
+ @if (currentPassword != null)
+ {
+
You typed: @currentPassword
+ }
+
+
+
+
+
+ @if (currentMultiLine != null)
+ {
+
You typed: @currentMultiLine
+ }
+
@functions {
- string currentValue;
+ string currentText;
+ string currentPassword;
+ string currentMultiLine;
}
diff --git a/src/RazorComponents.MaterialDesign/MdcTextArea.razor b/src/RazorComponents.MaterialDesign/MdcTextArea.razor
new file mode 100644
index 0000000..cc55ee3
--- /dev/null
+++ b/src/RazorComponents.MaterialDesign/MdcTextArea.razor
@@ -0,0 +1,23 @@
+@inherits MdcInputComponentBase
+@inject IJSRuntime jsRuntime
+
+
+
+@functions {
+ string id = Guid.NewGuid().ToString();
+ ElementReference textFieldElem;
+
+ [Parameter] public string Label { get; set; }
+ [Parameter] public int Rows { get; set; } = 4;
+ [Parameter] public int Cols { get; set; } = 40;
+
+ protected async override Task OnAfterFirstRenderAsync()
+ => await jsRuntime.InvokeAsync