onProjectGet
Project retrieval handler
This example demonstrates how the onProjectGet callback
retrieves a project from the host application. Once the project has been found, it is returned to the widget through the
onResponse
callback.
Project retrieval handler
onProjectGet: (projectKey: string, onResponse: (result: DIQ_Result, project: DIQ_Project | null) => void) => {
// Retrieve the project from the application's database
const project = database.getProject(projectKey);
// Return the project to the widget
onResponse({
success: true
}, project);
};