diff --git a/Ooui/TextArea.cs b/Ooui/TextArea.cs index 194cc9c..a3dab38 100644 --- a/Ooui/TextArea.cs +++ b/Ooui/TextArea.cs @@ -2,7 +2,7 @@ using System; namespace Ooui { - public class TextArea : Element + public class TextArea : FormControl { public event EventHandler Changed { add => AddEventListener ("change", value); @@ -12,7 +12,7 @@ namespace Ooui string text = ""; public override string Text { get => text; - set => SetProperty (ref text, value, "value"); + set => SetProperty (ref text, value ?? "", "value"); } int rows = 2; @@ -31,5 +31,11 @@ namespace Ooui : base ("textarea") { } + + public TextArea (string text) + : this () + { + Text = text; + } } }