blockly > MenuGenerator
Either an array of menu options or a function that generates an array of menu options for FieldDropdown or its descendants.
Signature:
export type MenuGenerator = MenuOption[] | MenuGeneratorFunction;
References: MenuOption, MenuGeneratorFunction
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[null,null,["Last updated 2024-09-18 UTC."],[[["`MenuGenerator` defines the type for options displayed in dropdowns within Blockly, like FieldDropdown."],["It accepts either a direct array of `MenuOption` objects or a `MenuGeneratorFunction` that dynamically creates this array."],["This type is utilized by FieldDropdown and similar components for generating their dropdown menus."]]],[]]