singleton
- Type:
boolean | ((params: CallbackParams) => boolean) - Optional: Yes
The singleton property treats the item as a single document rather than a list. The plugin will automatically handle the document ID and editor view.
Standard Usage
ts
{
schemaType: 'settings',
singleton: true,
}ts
helpers.singleton('settings');Dynamic Singleton (Callback)
You can define the singleton property dynamically using a callback function:
ts
{
schemaType: 'settings',
singleton: ({ workspace }) => workspace === 'production',
}