-
-
Save sendbird-community/6b6c2333fd47f12f13abfe5abb828c0f to your computer and use it in GitHub Desktop.
Pass data to modal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const openModal = async () => { | |
client = await app.initialized(); | |
const dataToPassToModal = await collectDataToPassToModal() | |
console.log(dataToPassToModal) | |
//Open calls modal and send data to the modal. | |
client.interface.trigger("showModal", { | |
title: "Sendbird fallback service", | |
template: "./modal.html", | |
data: dataToPassToModal | |
}).then(async function(data) { | |
console.log(data) | |
//Data was sent to the modal. | |
}).catch(function(error) { | |
console.log(error) | |
throw Error(error) | |
// error - error object | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment