DropdownProperties
export type DropdownProperties = {
Enabled: CanBeState<boolean>?,
Value: CanBeState<any>?,
Options: CanBeState<{any}>,
MaxVisibleItems: CanBeState<number>?,
HideDropdownWhenMouseLeaves: CanBeState<boolean>?,
OnSelected: (selectedOption: any) -> nil,
[any]: any,
}
The DropdownProperties table that is given to the Dropdown() function that contains data about the desired Dropdown component.
Properties
Enabled : CanBeState<boolean>?
Sets whether the Dropdown will be enabled or not. Can either be a State containing a boolean, or a boolean.
Value : CanBeState<any>?
The selected option value of the Dropdown. Can either be a State that contains anything, or just anything.
Options : CanBeState<{any}>?
The options within the Dropdown. Can either be a State that contains a table with anything, or just a table with anything.
- If a value within this table is an
Instance, or anEnumItem, then its name will be used as the option. - If a value within this table is a table, and it has one of these properties:
Label,Name,Title; then one of them will be used as the option. - If a value within this table is a
stringor something that can be turned into astring, then thatstringwill be used.
The found options will then be turned into a DropdownItem component to be used within the Dropdown.
MaxVisibleItems : CanBeState<number>?
The maximum amount of items that will be visible in the Dropdown. Can either be a State containing a number, or a number.
HideDropdownWhenMouseLeaves : CanBeState<boolean>?
Sets whether or not the Dropdown will be hidden when the mouse leaves. Can either be a State containing a boolean, or a boolean.
OnSelected : (selectedOption: any) -> nil
The callback function that will be called when an option has been selected from the Dropdown.