Skip to content

Commit

Permalink
fix required fields for TextInput [#155]
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaktushose committed Jan 12, 2025
1 parent 9d55834 commit 0591e44
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@
@Retention(RetentionPolicy.RUNTIME)
public @interface TextInput {

/// The placeholder of this TextInput
///
/// This is the short hint that describes the expected value of the TextInput field.
/// The label shown above this text input box.
///
/// @return Placeholder
String value();

/// The label shown above this text input box
/// The placeholder of this TextInput.
///
/// This is the short hint that describes the expected value of the TextInput field.
///
/// @return Label for the input
String label() default "";
String placeholder() default "";

/// The default value of this TextInput.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ public static Optional<TextInputDefinition> build(ParameterDescription parameter
var textInput = optional.get();

return Optional.of(new TextInputDefinition(
textInput.label().isEmpty() ? parameter.name() : textInput.label(),
textInput.value(),
textInput.value().isEmpty() ? parameter.name() : textInput.value(),
textInput.placeholder(),
textInput.defaultValue(),
textInput.minValue(),
textInput.maxValue(),
Expand Down

0 comments on commit 0591e44

Please # to comment.