Function applyStructureEdit

  • Inserts or deletes rows or columns with adjusted cell formulas (=SUM(D2:D4) → =SUM(D2:D5) after inserting a row inside, a deleted reference → #REF!), as one undo step and one onModelChanged (source "structure"). Rows: a spreadsheet, object rows (new objects from clipboard.createRow, otherwise {}; the app's array changes in place) and arrays; columns: a spreadsheet only. Not while a batch edit collects changes. Sorting and filters stay (the view is built again); the active cell stays inside the table.

    Parameters

    • scope: TableScope

      the table

    • edit: StructureEditIf

      what to change

    • Optional opts: {
          record?: boolean;
          rows?: unknown[];
          source?: CellChangeSource;
      } = {}

      record: false = no undo step; rows: the rows to insert (redo); source of the event

      • Optional record?: boolean
      • Optional rows?: unknown[]
      • Optional source?: CellChangeSource

    Returns boolean

    true if changed

    Since

    1.1.99