Skip to content

Commit cd6d14b

Browse files
committed
isBlank for textarea
1 parent dde9136 commit cd6d14b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

haxe/ui/components/TextArea.hx

+8
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,14 @@ class TextArea extends InteractiveComponent implements IFocusable implements ICo
8282
@:clonable @:behaviour(IconBehaviour) public var icon:String;
8383
@:style(layout) public var iconPosition:String;
8484

85+
public var isBlank(get, null):Bool;
86+
private function get_isBlank():Bool {
87+
if (text == null) {
88+
return true;
89+
}
90+
return StringTools.trim(text).length == 0;
91+
}
92+
8593
//***********************************************************************************************************
8694
// Validation
8795
//***********************************************************************************************************

0 commit comments

Comments
 (0)