From 772318065e74d5d133bf617a159ca34b0c312dd8 Mon Sep 17 00:00:00 2001 From: Simon Jahreiss Date: Fri, 9 Dec 2022 11:32:12 +0100 Subject: [PATCH] Added isCompact to ExtendedFormSelectField --- .../com/linkedplanet/uikit/extension/form/ExtendedForm.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ui-kit-lib/src/main/kotlin/com/linkedplanet/uikit/extension/form/ExtendedForm.kt b/ui-kit-lib/src/main/kotlin/com/linkedplanet/uikit/extension/form/ExtendedForm.kt index e9bf4cf..f1fe153 100644 --- a/ui-kit-lib/src/main/kotlin/com/linkedplanet/uikit/extension/form/ExtendedForm.kt +++ b/ui-kit-lib/src/main/kotlin/com/linkedplanet/uikit/extension/form/ExtendedForm.kt @@ -191,6 +191,7 @@ fun RBuilder.ExtendedFormSelectField( options: Array, defaultValue: SelectOption? = null, isRequired: Boolean = false, + isCompact: Boolean = false, validationMapping: ValidationMapping? = null, validate: (value: dynamic, form: dynamic, fieldState: dynamic) -> String? = { _, _, _ -> "" }, onChange: (SelectOption) -> Unit = {}, @@ -204,6 +205,7 @@ fun RBuilder.ExtendedFormSelectField( options, defaultValue, isRequired, + isCompact, validationMapping, validate, onChange, @@ -220,6 +222,7 @@ fun RBuilder.ExtendedFormSelectField( options: Array, defaultValue: SelectOption? = null, isRequired: Boolean = false, + isCompact: Boolean = false, validationMapping: ValidationMapping? = null, validate: (value: dynamic, form: dynamic, fieldState: dynamic) -> String? = { _, _, _ -> "" }, onChange: (SelectOption) -> Unit = {}, @@ -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