Stay organized with collections Save and categorize content based on your preferences.

blockly > FieldDropdown > getOptions

FieldDropdown.getOptions() method

Return a list of the options for this dropdown.

Signature:

getOptions(opt_useCache?: boolean): MenuOption[];

Parameters

Parameter Type Description
opt_useCache boolean (Optional) For dynamic options, whether or not to use the cached options or to re-generate them.

Returns:

MenuOption[]

A non-empty array of option tuples: (human-readable text or image, language-neutral name).

Exceptions

{TypeError} If generated options are incorrectly structured.