Skip to content

generateSelectOptions

Function | Source Code


generateSelectOptions(currentlySelectedValue: T, options: (SelectOption | SelectOptionGroup)[], allowEmpty: boolean, allowEmptyAfterSelection: boolean): NonNullable<SelectProps[“options”]>


Convenience function for generating your select options when you’d like to introduce the possibility of having an empty option.

The value that’s currently selected.


options: (SelectOption | SelectOptionGroup)[]

Section titled “options: (SelectOption | SelectOptionGroup)[]”

The options for the select.


Whether an empty selection is available. The empty value will have a value of ''.


Whether the empty selection is available after a selection has been made. This only has an affect if allowEmpty is true.