From 46c396e33fe278618e39da8e1e4138fef38e860c Mon Sep 17 00:00:00 2001 From: stm Date: Wed, 18 Jan 2023 13:32:25 +0100 Subject: [PATCH] Progress --- .../Components/Input/Input.razor | 29 ++++++++++++++++--- .../Components/Input/Input.razor.cs | 26 +++++++++++------ 2 files changed, 42 insertions(+), 13 deletions(-) diff --git a/src/Connected.Components/Components/Input/Input.razor b/src/Connected.Components/Components/Input/Input.razor index f8ec156..e27444b 100644 --- a/src/Connected.Components/Components/Input/Input.razor +++ b/src/Connected.Components/Components/Input/Input.razor @@ -2,7 +2,25 @@ @typeparam T @inherits InputBase -
+ +
+ + + + @if (Adornment == Adornment.Start) {
} -
+ + + + + + diff --git a/src/Connected.Components/Components/Input/Input.razor.cs b/src/Connected.Components/Components/Input/Input.razor.cs index 787d351..0c282bc 100644 --- a/src/Connected.Components/Components/Input/Input.razor.cs +++ b/src/Connected.Components/Components/Input/Input.razor.cs @@ -310,7 +310,6 @@ public partial class Input : InputBase #endregion - #region Content placeholders /// @@ -390,8 +389,24 @@ public partial class Input : InputBase private bool _showClearable; private string _internalText; - #endregion + /// + /// Sets the input text from outside programmatically + /// + /// + /// + public Task SetText(string text) + { + _internalText = text; + return SetTextAsync(text); + } + private bool HasNativeHtmlPlaceholder() + { + return GetInputType() is InputType.Color or InputType.Date or InputType.DateTimeLocal or InputType.Month + or InputType.Time or InputType.Week; + } + + #endregion #region Lifecycle events @@ -429,13 +444,6 @@ public partial class Input : InputBase ChangeTextImmediately = true; } #endregion - - - - - - - }