Skip to Content
⚠️Active Development Notice: TimeTiles is under active development. Information may be placeholder content or not up-to-date.

web


web / lib/collections/sites/hooks

lib/collections/sites/hooks

Hooks for the Sites collection.

Provides lifecycle hooks for:

  • Setting createdBy on creation
  • Enforcing single default site
  • Invalidating site cache on changes
  • Auto-creating a default View when a Site is created

Variables

enforceSingleDefault

const enforceSingleDefault: CollectionBeforeChangeHook<Site>

Enforces that only one site can be the default. When a site is set as default, unsets any other default sites.


invalidateSiteCache

const invalidateSiteCache: CollectionAfterChangeHook<Site>

Invalidates the site resolver cache after any site change.


createDefaultView

const createDefaultView: CollectionAfterChangeHook<Site>

Auto-creates a default View when a new Site is created. The View shows all data with auto-detected filters and default map settings.

References

setCreatedBy

Renames and re-exports setCreatedByHook

Last updated on