Survei Riset: Ceritakan pengalaman Anda dengan Blockly
Mulai survei
blockly > MenuGeneratorFunction
Fungsi yang menghasilkan array opsi menu untuk FieldDropdown atau turunannya.
Tanda Tangan:
export type MenuGeneratorFunction = (this: FieldDropdown) => MenuOption[];
Referensi: FieldDropdown, MenuOption
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2024-11-30 UTC.
[null,null,["Terakhir diperbarui pada 2024-11-30 UTC."],[[["`MenuGeneratorFunction` is a type representing a function that creates menu options for dropdown fields in Blockly."],["This function is used by `FieldDropdown` and similar components to dynamically populate their dropdown menus."],["The function takes a `FieldDropdown` instance as its context (`this`) and returns an array of `MenuOption` objects."],["Each `MenuOption` object defines a single entry in the dropdown menu, including its display text and value."]]],[]]