Skip to content

Commit

Permalink
Fixed problem with populating data and handling data changes in the F…
Browse files Browse the repository at this point in the history
…ormulas plugin #7031
  • Loading branch information
wszymanski committed Sep 22, 2021
1 parent 67c92c0 commit 6bb854a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/dataMap/metaManager/mods/dynamicCellMeta.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ export class DynamicCellMetaMod {
visualCol,
} = cellMeta;
const hot = this.metaManager.hot;
const prop = hot.colToProp(visualCol);
const colFromProp = hot.colToProp(visualCol);
const prop = colFromProp === null ? visualCol : colFromProp;

cellMeta.prop = prop;

Expand Down
8 changes: 5 additions & 3 deletions src/plugins/formulas/formulas.js
Original file line number Diff line number Diff line change
Expand Up @@ -748,12 +748,14 @@ export class Formulas extends BasePlugin {
const changedCells = [];

changes.forEach(([row, prop, , newValue]) => {
const column = this.hot.propToCol(prop);
const colFromProp = this.hot.propToCol(prop);
const column = colFromProp === null ? prop : colFromProp;
const physicalRow = this.hot.toPhysicalRow(row);
const physicalColumn = this.hot.toPhysicalColumn(column);

const address = {
row: physicalRow,
col: physicalColumn,
row: physicalRow === null ? row : physicalRow,
col: physicalColumn === null ? column : physicalColumn,
sheet: this.sheetId,
};

Expand Down

0 comments on commit 6bb854a

Please sign in to comment.