Skip to content

Commit

Permalink
Added fixed positioning to ExtendedFormSelectField
Browse files Browse the repository at this point in the history
  • Loading branch information
sjahreis committed Jul 21, 2022
1 parent 29a7d12 commit 706ae7f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ fun RBuilder.ExtendedFormSelectField(
isRequired: Boolean = false,
validationMapping: ValidationMapping? = null,
validate: (value: dynamic, form: dynamic, fieldState: dynamic) -> String? = { _, _, _ -> "" },
onChange: (SelectOption) -> Unit = {}
onChange: (SelectOption) -> Unit = {},
menuPosition: String = "fixed"
) {
ExtendedFormField(
name,
Expand All @@ -171,6 +172,7 @@ fun RBuilder.ExtendedFormSelectField(
val selectProps: SelectProps = props.fieldProps
selectProps.inputId = name
selectProps.options = options
selectProps.menuPosition = menuPosition
val origOnChange = selectProps.onChange
selectProps.onChange = {
origOnChange(it)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ external interface SelectProps : Props {
var isDisabled: Boolean
var styles: SelectStyles
var noOptionsMessage: (searchString: String) -> String
var menuPosition: String
}

@JsName("default")
Expand Down Expand Up @@ -95,4 +96,4 @@ external interface CreatableSelectProps : Props {
var styles: SelectStyles
var spacing: String
var formatCreateLabel: (String) -> String
}
}

0 comments on commit 706ae7f

Please sign in to comment.