Survei Riset: Ceritakan pengalaman Anda dengan Blockly
Mulai survei
blockly > FieldDropdown > onItemSelected_
Metode FieldDropdown.onItemSelected_()
Tangani pemilihan item di menu dropdown.
Tanda Tangan:
protected onItemSelected_(menu: Menu, menuItem: MenuItem): void;
Parameter
Parameter |
Jenis |
Deskripsi |
menu |
Menu |
Komponen Menu diklik. |
menuItem |
MenuItem |
MenuItem dipilih dalam menu. |
Hasil:
void
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-09-10 UTC.
[null,null,["Terakhir diperbarui pada 2024-09-10 UTC."],[[["The `onItemSelected_` method is called when a user selects an item from a FieldDropdown's menu."],["It receives the `Menu` and selected `MenuItem` as input, allowing developers to react to the user's choice."],["This method is intended for internal use and doesn't return any value."]]],["The `onItemSelected_` method within the `FieldDropdown` class handles dropdown menu item selection. It receives two parameters: `menu`, representing the clicked `Menu` component, and `menuItem`, representing the selected `MenuItem` within that menu. This method processes the specific `MenuItem` choice and performs actions based on the selection within a `FieldDropdown`, it does not return a value.\n"]]