ui.Select
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
कॉलबैक के साथ प्रिंट किया जा सकने वाला चुनिंदा मेन्यू.
इस्तेमाल | रिटर्न |
---|
ui.Select(items, placeholder, value, onChange, disabled, style) | ui.Select |
आर्ग्यूमेंट | टाइप | विवरण |
---|
items | List<Object>, ज़रूरी नहीं | चुनने के लिए उपलब्ध विकल्पों की सूची. डिफ़ॉल्ट रूप से, यह खाली कलेक्शन होता है. |
placeholder | स्ट्रिंग, ज़रूरी नहीं | कोई वैल्यू न चुनने पर दिखने वाला प्लेसहोल्डर. डिफ़ॉल्ट रूप से, "कोई वैल्यू चुनें..." पर सेट होता है. |
value | स्ट्रिंग, ज़रूरी नहीं | select की वैल्यू. डिफ़ॉल्ट रूप से, यह वैल्यू शून्य पर सेट होती है. |
onChange | फ़ंक्शन, ज़रूरी नहीं | आइटम चुने जाने पर ट्रिगर होने वाला कॉलबैक. कॉलबैक में, फ़िलहाल चुनी गई वैल्यू और चुने गए विजेट को पास किया जाता है. |
disabled | बूलियन, ज़रूरी नहीं | चुनने की सुविधा बंद है या नहीं. डिफ़ॉल्ट रूप से, यह 'गलत' पर सेट होती है. |
style | ऑब्जेक्ट, ज़रूरी नहीं | इस विजेट के लिए सेट की जाने वाली वैल्यू के साथ, इस्तेमाल की जा सकने वाली सीएसएस स्टाइल का ऑब्जेक्ट. style() का दस्तावेज़ देखें. |
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया."],[[["\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. |"]]