Skip to content

Commit

Permalink
Added isCompact to ExtendedFormSelectField
Browse files Browse the repository at this point in the history
  • Loading branch information
sjahreis committed Dec 9, 2022
1 parent 190ae14 commit 7723180
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ fun <T> RBuilder.ExtendedFormSelectField(
options: Array<SelectOption>,
defaultValue: SelectOption? = null,
isRequired: Boolean = false,
isCompact: Boolean = false,
validationMapping: ValidationMapping? = null,
validate: (value: dynamic, form: dynamic, fieldState: dynamic) -> String? = { _, _, _ -> "" },
onChange: (SelectOption) -> Unit = {},
Expand All @@ -204,6 +205,7 @@ fun <T> RBuilder.ExtendedFormSelectField(
options,
defaultValue,
isRequired,
isCompact,
validationMapping,
validate,
onChange,
Expand All @@ -220,6 +222,7 @@ fun RBuilder.ExtendedFormSelectField(
options: Array<SelectOption>,
defaultValue: SelectOption? = null,
isRequired: Boolean = false,
isCompact: Boolean = false,
validationMapping: ValidationMapping? = null,
validate: (value: dynamic, form: dynamic, fieldState: dynamic) -> String? = { _, _, _ -> "" },
onChange: (SelectOption) -> Unit = {},
Expand All @@ -234,6 +237,7 @@ fun RBuilder.ExtendedFormSelectField(
validate
) { props ->
val selectProps: SelectProps = props.fieldProps
selectProps.spacing = if (isCompact) "compact" else "default"
selectProps.inputId = name
selectProps.options = options
selectProps.menuPosition = menuPosition
Expand Down

0 comments on commit 7723180

Please sign in to comment.