The Home provider to register.
A promise that resolves with a HomeRegistration
object once the Dock provider is successfully registered. This contains the client API version, Workspace Version and a function to set the search query.
A Workspace Platform must be initialized.
An error if the Workspace Platform is not initialized.
An error if a Home provider with the same id
is already registered.
Register a Basic Home provider
import { Home, type HomeProvider } from '@openfin/workspace';
const provider: HomeProvider = {
title: "My Home Provider"
inputPlaceholder: "Search with My Home Provider",
icon: "https://www.openfin.co/favicon-32x32.png",
listTitle: "My Home Provider Results",
logoUrl: "https://www.openfin.co/favicon-32x32.png",
id: "my-home-provider",
onUserInput: (req, res) => {
console.log(req.query);
return { results: [], context: { filters: [] } }
},
dispatchFocusEvents: true,
};
await Home.register(provider)
await Home.show()
API function to register a Home provider.