Class UpdatedWidget
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
अपडेट किया गयाविजेट
अपडेट किए गए विजेट का जवाब. इसका इस्तेमाल, SelectionInput
में एक से ज़्यादा आइटम चुनने वाले मेन्यू के लिए, ऑटोकंप्लीट के विकल्प देने के लिए किया जाता है.
const updatedWidget = CardService.newUpdatedWidget()
.addItem(
'item_one_title',
'item_one_value',
false,
'item_one_uri',
'item_one_bottom_text',
)
.addItem(
'item_two_title',
'item_two_value',
false,
'item_two_uri',
'item_two_bottom_text',
);
यह सुविधा सिर्फ़ Google Chat ऐप्लिकेशन के लिए उपलब्ध है. Google Workspace के ऐड-ऑन के लिए उपलब्ध नहीं है.
ज़्यादा जानकारी वाला दस्तावेज़
addItem(text, value, selected, startIconUri, bottomText)
एक नया आइटम जोड़ता है, जिसे चुना जा सकता है.
const updatedWidget = CardService.newUpdatedWidget()
.addItem(
'item_one_title',
'item_one_value',
false,
'item_one_uri',
'item_one_bottom_text',
)
.addItem(
'item_two_title',
'item_two_value',
false,
'item_two_uri',
'item_two_bottom_text',
);
यह सुविधा सिर्फ़ Google Chat ऐप्लिकेशन के लिए उपलब्ध है. Google Workspace के ऐड-ऑन के लिए उपलब्ध नहीं है.
पैरामीटर
नाम | टाइप | ब्यौरा |
text | Object | इस आइटम के लिए दिखाया जाने वाला टेक्स्ट. नॉन-स्ट्रिंग प्राइमिटिव आर्ग्युमेंट,
स्ट्रिंग में अपने-आप बदल जाते हैं. |
value | Object | कॉलबैक के ज़रिए भेजी गई फ़ॉर्म इनपुट वैल्यू. स्ट्रिंग प्राइमटिव आर्ग्युमेंट के अलावा, अन्य आर्ग्युमेंट को स्ट्रिंग में अपने-आप बदल दिया जाता है. |
selected | Boolean | आइटम डिफ़ॉल्ट रूप से चुना गया है या नहीं. अगर चुनने के लिए दिया गया इनपुट सिर्फ़ एक वैल्यू स्वीकार करता है, जैसे कि रेडियो बटन या ड्रॉपडाउन मेन्यू के लिए, तो इस फ़ील्ड को सिर्फ़ एक आइटम के लिए सेट करें. |
startIconUri | Object | एक से ज़्यादा आइटम चुनने की सुविधा वाले मेन्यू के लिए, आइटम के टेक्स्ट फ़ील्ड के बगल में दिखने वाले आइकॉन का यूआरएल. PNG और JPEG फ़ाइलों के साथ काम करता है. |
bottomText | Object | एक से ज़्यादा विकल्प वाले मेन्यू के लिए, आइटम के टेक्स्ट फ़ील्ड के नीचे दिखने वाला टेक्स्ट ब्यौरा या लेबल. |
वापसी का टिकट
UpdatedWidget
— चेन करने के लिए यह ऑब्जेक्ट.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया."],[[["\u003cp\u003e\u003ccode\u003eUpdatedWidget\u003c/code\u003e provides autocomplete options for multiselect menus in SelectionInput, specifically for Google Chat apps.\u003c/p\u003e\n"],["\u003cp\u003eIt allows adding items with customizable text, value, selection state, icon, and bottom text using the \u003ccode\u003eaddItem\u003c/code\u003e method.\u003c/p\u003e\n"],["\u003cp\u003eThis functionality is exclusive to Google Chat apps and is not available for Google Workspace Add-ons.\u003c/p\u003e\n"]]],[],null,["# Class UpdatedWidget\n\nUpdatedWidget\n\nThe response of the updated widget. Used to provide autocomplete options for multiselect menu in\n[SelectionInput](/apps-script/reference/card-service/selection-input).\n\n```javascript\nconst updatedWidget = CardService.newUpdatedWidget()\n .addItem(\n 'item_one_title',\n 'item_one_value',\n false,\n 'item_one_uri',\n 'item_one_bottom_text',\n )\n .addItem(\n 'item_two_title',\n 'item_two_value',\n false,\n 'item_two_uri',\n 'item_two_bottom_text',\n );\n```\n\nOnly available for Google Chat apps. Not available for Google Workspace add-ons. \n\n### Methods\n\n| Method | Return type | Brief description |\n|-----------------------------------------------------------------------------------------------------------|--------------------|---------------------------------------|\n| [addItem(text, value, selected, startIconUri, bottomText)](#addItem(Object,Object,Boolean,Object,Object)) | [UpdatedWidget](#) | Adds a new item that can be selected. |\n\nDetailed documentation\n----------------------\n\n### `add``Item(text, value, selected, startIconUri, bottomText)`\n\nAdds a new item that can be selected.\n\n```javascript\nconst updatedWidget = CardService.newUpdatedWidget()\n .addItem(\n 'item_one_title',\n 'item_one_value',\n false,\n 'item_one_uri',\n 'item_one_bottom_text',\n )\n .addItem(\n 'item_two_title',\n 'item_two_value',\n false,\n 'item_two_uri',\n 'item_two_bottom_text',\n );\n```\nOnly available for Google Chat apps. Not available for Google Workspace add-ons.\n\n#### Parameters\n\n| Name | Type | Description |\n|--------------------|-----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `text` | `Object` | The text to be shown for this item. Non-string primitive arguments are converted to strings automatically. |\n| `value` | `Object` | The form input value that is sent via the callback. Non-string primitive arguments are converted to strings automatically. |\n| `selected` | `Boolean` | Whether the item is selected by default. If the selection input only accepts one value (such as for radio buttons or a dropdown menu), only set this field for one item. |\n| `start``Icon``Uri` | `Object` | For multiselect menus, the URL for the icon displayed next to the item's text field. Supports PNG and JPEG files. |\n| `bottom``Text` | `Object` | For multiselect menus, a text description or label that's displayed below the item's text field. |\n\n#### Return\n\n\n[UpdatedWidget](#) --- This object, for chaining."]]