ui.Select
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
یک منوی انتخابی قابل چاپ با پاسخ به تماس.
استفاده | برمی گرداند | ui.Select( items , placeholder , value , onChange , disabled , style ) | ui.انتخاب کنید |
استدلال | تایپ کنید | جزئیات | items | List<Object>، اختیاری است | لیست گزینه هایی که باید به انتخاب اضافه کنید. به طور پیش فرض یک آرایه خالی است. |
placeholder | رشته، اختیاری | زمانی که هیچ مقداری انتخاب نشده باشد، مکاننما نشان داده میشود. پیشفرض «انتخاب یک مقدار...» است. |
value | رشته، اختیاری | مقدار منتخب پیش فرض ها null می شوند. |
onChange | عملکرد، اختیاری | زمانی که یک مورد انتخاب می شود، تماس برگشتی فعال می شود. تماس برگشتی به مقدار انتخابی فعلی و ویجت انتخابی ارسال می شود. |
disabled | بولی، اختیاری | اینکه آیا انتخاب غیرفعال است. پیش فرض به نادرست. |
style | شیء، اختیاری | یک شی از سبک های CSS مجاز با مقادیر آنها برای تنظیم این ویجت. به مستندات style() مراجعه کنید. |
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eCreate a customizable select menu with \u003ccode\u003eui.Select()\u003c/code\u003e by providing items, placeholder, initial value, and styles.\u003c/p\u003e\n"],["\u003cp\u003eDefine an \u003ccode\u003eonChange\u003c/code\u003e callback function to execute actions when a user selects an item from the menu, receiving the selected value and the select widget.\u003c/p\u003e\n"],["\u003cp\u003eUtilize optional parameters like \u003ccode\u003edisabled\u003c/code\u003e to control interactivity and \u003ccode\u003estyle\u003c/code\u003e to modify the appearance of the select menu.\u003c/p\u003e\n"]]],[],null,["# ui.Select\n\n\u003cbr /\u003e\n\nA printable select menu with a callback.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|------------------------------------------------------------------------------------------------|-----------|\n| `ui.Select(`*items* `, `*placeholder* `, `*value* `, `*onChange* `, `*disabled* `, `*style*`)` | ui.Select |\n\n| Argument | Type | Details |\n|---------------|--------------------------|---------------------------------------------------------------------------------------------------------------------------|\n| `items` | List\\\u003cObject\\\u003e, optional | The list of options to add to the select. Defaults to an empty array. |\n| `placeholder` | String, optional | The placeholder shown when no value is selected. Defaults to \"Select a value...\". |\n| `value` | String, optional | The select's value. Defaults to null. |\n| `onChange` | Function, optional | The callback to fire when an item is selected. The callback is passed the currently selected value and the select widget. |\n| `disabled` | Boolean, optional | Whether the select is disabled. Defaults to false. |\n| `style` | Object, optional | An object of allowed CSS styles with their values to be set for this widget. See style() documentation. |"]]