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

    Interface Events

    Events for ISheet.

    interface Events {
        onAutoTableChange?(source: ISheet): void;
        onBeforeDelete?(source: ISheet): void;
        onBeforeLoad?(source: ISheet, json: ISheet.JSON): void;
        onBeforeSave?(source: ISheet): void | Promise<void>;
        onClose?(source: ISheet): void;
        onColumnsHiddenChange?(source: ISheet): void;
        onCommentsChange?(source: ISheet): void;
        onConditionalFormatsChange?(source: ISheet): void;
        onDataChange?(source: ISheet): void;
        onDataValidationsChange?(source: ISheet): void;
        onDelete?(source: ISheet): void;
        onFreezePaneChange?(source: ISheet): void;
        onIndexChange?(source: ISheet): void;
        onInvalidated?(source: ISheet): void;
        onLayoutChange?(source: ISheet): void;
        onLoad?(source: ISheet): void;
        onMergesChange?(source: ISheet): void;
        onMovablesChange?(source: ISheet): void;
        onMovableSelectionChange?(source: ISheet): void;
        onNameChange?(source: ISheet): void;
        onProtectedRangesChange?(source: ISheet): void;
        onProtectionChange?(source: ISheet): void;
        onRequestFocus?(source: ISheet): Promise<boolean>;
        onRequestScrollIntoView?(
            source: ISheet,
            options: ScrollToOptions,
        ): Promise<boolean>;
        onRequestViewport?(source: ISheet): Promise<Bounds | null>;
        onRowsHiddenChange?(source: ISheet): void;
        onSave?(source: ISheet, json: ISheet.JSON): void;
        onSelectionChange?(source: ISheet): void;
        onSpillsChange?(source: ISheet): void;
        onStyleChange?(source: ISheet): void;
        onTabColorChange?(source: ISheet): void;
        onTablesChange?(source: ISheet): void;
        onTopLeftChange?(source: ISheet): void;
        onUsedRangeChange?(source: ISheet): void;
        onViewChange?(source: ISheet): void;
        onViewChange?(source: ISheet): void;
        onVisibilityChange?(source: ISheet): void;
        onZoomScaleChange?(source: ISheet): void;
    }
    Index
    • Called when the auto table is added or removed.

      Parameters

      Returns void

    • Called before delete. If any exception is thrown the exception will be returned to the client and delete will be aborted.

      Parameters

      Returns void

    • Called before load. If any exception is thrown this exception will be returned to the client and delete will fail.

      Parameters

      Returns void

    • Called before load. If any exception is thrown this exception will be returned to the client and delete will be aborted.

      Parameters

      Returns void | Promise<void>

    • Called when the sheet is closed.

      Parameters

      Returns void

    • Called when which columns are hidden has changed.

      Parameters

      Returns void

    • Called when a comment is added, removed, edited, resolved, replied to or re-anchored.

      Parameters

      Returns void

      Always accompanied by the coarse onStyleChange, since a cell paints its comment indicator.

    • Called when any conditional format is added, removed, re-anchored, reordered, or finishes (re)evaluating — a rule's results land asynchronously, after the calculation engine answers.

      Parameters

      Returns void

      Always accompanied by the coarse onStyleChange. Listen here only when reacting to the rules themselves (an editor panel); renderers should listen to the class event instead.

    • Called when any data has changed.

      Parameters

      Returns void

      This is a course event that indicates that data has changed. To listen for changes on data regions use ICellRange.addListener.

    • Called when any data validation is added, removed, re-anchored, or re-evaluates its results.

      Parameters

      Returns void

      Always accompanied by the coarse onStyleChange. Listen here only when reacting to the validations themselves (an editor panel, the alert indicators); renderers should listen to the class event instead.

    • Called when the sheet is deleted.

      Parameters

      Returns void

    • Called when freeze or split settings have changed.

      Parameters

      Returns void

      This is a delegated event from the ISheetView.

    • Called when the index changes.

      Parameters

      Returns void

    • Called when the state has been updated due to a undo/redo and a rerender is required.

      Parameters

      Returns void

    • Called when the sizes of the cells change.

      Parameters

      Returns void

      One of the three coarse class events (see onStyleChange): the single subscription for "cell geometry moved".

      • This can be be due to row/column sizes changes or changing the max rows columns.
      • Zoom and viewport do not change the underlying layout.
    • Called after load.

      Parameters

      Returns void

    • Called when any merges are added or removed.

      Parameters

      Returns void

    • Called when any movables are added or removed.

      Parameters

      Returns void

    • Called when the movable selection changes.

      Parameters

      Returns void

      This is a delegated event from the ISheetView.

    • Called when the name changes.

      Parameters

      Returns void

    • Called when protected ranges are added, removed, renamed, reordered or re-anchored.

      Parameters

      Returns void

      Always accompanied by the coarse onProtectionChange.

    • Called on any protection changes.

      Parameters

      Returns void

      One of the three coarse class events (see onStyleChange): the single subscription for "what the user may touch changed" — the sheet lock state, its allowed actions, and the protected ranges (onProtectedRangesChange) all raise it.

    • Request that the sheet become focused.

      Parameters

      Returns Promise<boolean>

      A promise indicating if the focus was honored.

      This should only be handled by one consumer.

    • Request that the sheet become focused.

      Parameters

      Returns Promise<boolean>

      A promise indicating if the focus was honored.

      This should only be handled by one consumer.

    • Request the visible viewport ("window") bounds in absolute sheet pixels — the one placement input the model can't derive itself. Used to center a bounds-less movable (e.g. a chart via IMovableCollection.AddOptions.autoPlace); when no consumer responds (headless) the add falls back to default cursor placement.

      Parameters

      Returns Promise<Bounds | null>

      This should only be handled by one consumer (the grid view).

    • Called when which rows are hidden has changed.

      Parameters

      Returns void

    • Called when the selection changes.

      Parameters

      Returns void

      This is a delegated event from the ISheetView.

    • Called if any spills occur.

      Parameters

      Returns void

    • Called when anything that affects how cells PAINT (other than data or layout) changes.

      Parameters

      Returns void

      One of the three coarse class events (with onLayoutChange and onProtectionChange): a single subscription for "the sheet may render differently", meant for renderers so they never have to accumulate the finer-grained events. It fires alongside each of them — direct and named style edits, table styling (onTablesChange), conditional formatting results (onConditionalFormatsChange, including their asynchronous evaluation completing), and data validation visuals (onDataValidationsChange) all raise it. Listen to a finer event only when reacting to that specific collection.

    • Called when the sheet tab color changes.

      Parameters

      Returns void

    • Called when any table are added or removed.

      Parameters

      Returns void

    • Called when the topLeft changes.

      Parameters

      Returns void

      This is a delegated event from the ISheetView.

    • Called when the UsedRange bounds changes.

      Parameters

      Returns void

      Useful when interested in knowing when the bounds of the area that is being used within the sheet changes; for example this is used by the scrollbars to adjust the size.

    • Called when the ISheetView changes.

      This is not called when individual properties on the view change.

      Parameters

      Returns void

    • Called when the view changes.

      Parameters

      Returns void

    • Called when the visibility changes..

      Parameters

      Returns void

    • Called when the zoom scale changes.

      Parameters

      Returns void

      This is a delegated event from the ISheetView.