SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...

    Function useWindowChrome

    • Opt-in single-per-window app chrome for a workbook: document/tab title (with an unsaved marker), an unsaved-changes close prompt, and a browser keyboard guard. A thin React wrapper over WindowChrome.

      Parameters

      • name: string | null

        The workbook display name to reflect, or null (see useWorkbookName).

      • isDirty: boolean

        Whether there are unsaved changes (see useWorkbookSaveState).

      • options: WindowChromeOptions = {}

        Behavior options (title / close prompt / keyboard guard).

      Returns void

      For apps that own the whole window — NOT for embedding Studio as a widget (which must not touch the window title / beforeunload of its host). Each concern (title / close / keyboard) defaults on and can be disabled individually via WindowChromeOptions.

      const name = useWorkbookName(workbook);
      const { isDirty } = useWorkbookSaveState(workbook, WorkbookIO);
      useWindowChrome(name, isDirty);