Skip to content

Commit ae735be

Browse files
committed
Draws a dropdown value even if the value is invalid
1 parent 6881e0f commit ae735be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Editor/Elements/TriDropdownElement.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public override void OnGUI(Rect position)
4545
_currentValue = _property.Value;
4646
_currentText = _valuesGetter.Invoke(_property)
4747
.FirstOrDefault(it => _property.Comparer.Equals(it.Value, _property.Value))
48-
?.Text ?? "";
48+
?.Text ?? (_property.Value?.ToString() ?? string.Empty);
4949
}
5050

5151
var controlId = GUIUtility.GetControlID(FocusType.Passive);

0 commit comments

Comments
 (0)