Class ChatClientDataSource
ChatClientDataSource
สําหรับวิดเจ็ต SelectionInput
ที่ใช้เมนูแบบเลือกหลายรายการ แหล่งข้อมูลจาก Google Chat
แหล่งข้อมูลจะป้อนข้อมูลรายการตัวเลือกสำหรับเมนูแบบเลือกหลายรายการ เช่น ผู้ใช้สามารถเลือกพื้นที่ใน Google Chat ของตน
const chatSpaceDataSource =
CardService.newChatSpaceDataSource().setDefaultToCurrentSpace(true);
const chatClientDataSource =
CardService.newChatClientDataSource().setSpaceDataSource(
chatSpaceDataSource);
ใช้ได้กับแอป Google Chat เท่านั้น ไม่พร้อมใช้งานสำหรับส่วนเสริมของ Google Workspace
เอกสารประกอบโดยละเอียด
setSpaceDataSource(spaceDataSource)
แหล่งข้อมูลที่ป้อนข้อมูลพื้นที่ใน Google Chat เป็นรายการตัวเลือกสำหรับเมนูแบบเลือกหลายรายการ แสดงเฉพาะพื้นที่ทำงานที่ผู้ใช้เป็นสมาชิก
const chatSpaceDataSource =
CardService.newChatSpaceDataSource().setDefaultToCurrentSpace(true);
const chatClientDataSource =
CardService.newChatClientDataSource().setSpaceDataSource(
chatSpaceDataSource);
ใช้ได้กับแอป Google Chat เท่านั้น ไม่พร้อมใช้งานสำหรับส่วนเสริมของ Google Workspace
พารามิเตอร์
รีเทิร์น
ChatClientDataSource
— ออบเจ็กต์นี้สําหรับการต่อเชื่อม
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-01-30 UTC
[null,null,["อัปเดตล่าสุด 2025-01-30 UTC"],[[["`ChatClientDataSource` is used for multiselect menus in Google Chat apps, allowing users to select items like Google Chat spaces they are members of."],["This data source relies on a `ChatSpaceDataSource` to populate the selectable spaces in the menu."],["It is exclusively available for Google Chat apps and cannot be utilized in Google Workspace Add-ons."],["The `setSpaceDataSource` method configures the data source for populating Google Chat spaces in the selection menu, limited to spaces where the user is a member."]]],["`ChatClientDataSource` is a data source for multiselect menus in Google Chat apps. It populates selection items with Google Chat spaces a user belongs to. The `setSpaceDataSource` method configures this behavior, taking a `ChatSpaceDataSource` as input. Using `CardService.newChatClientDataSource()` allows the setting up the data source and `CardService.newChatSpaceDataSource().setDefaultToCurrentSpace(true)` allows the default current space. The data is only available for Google Chat apps, not Google Workspace add-ons.\n"]]