SheetXL - v1.0.2
    Preparing search index...

    Function useGridSurface

    • The SheetSurface the calling layer is rendered on, or null outside a sheet's surfaces.

      Returns SheetSurface | null

      Only a layer declared on more than one surface needs it, to render the part that belongs on each:

      const surface = useGridSurface();
      if (surface === 'rowHeaders') return <MyButtons />;
      if (surface === 'cells') return <MyPreview />;
      return null;