@flamy-dev/react-spreadsheet
Advanced tools
Comparing version 0.4.47 to 0.4.48
@@ -33,7 +33,7 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2"; | ||
_this.handleChange = function (row, column, cell) { | ||
_this.handleChange = function (row, column, cell, getCell, data) { | ||
var _this$props = _this.props, | ||
setCellData = _this$props.setCellData, | ||
getBindingsForCell = _this$props.getBindingsForCell; | ||
var bindings = getBindingsForCell(cell); | ||
var bindings = getBindingsForCell(cell, getCell, data); | ||
setCellData({ | ||
@@ -71,2 +71,7 @@ row: row, | ||
}, { | ||
key: "getCell", | ||
value: function getCell(row, column, data) { | ||
return Matrix.get(row, column, data); | ||
} | ||
}, { | ||
key: "render", | ||
@@ -88,3 +93,4 @@ value: function render() { | ||
mode = _this$props3.mode, | ||
edit = _this$props3.edit; | ||
edit = _this$props3.edit, | ||
data = _this$props3.data; | ||
DataEditor = cell && cell.DataEditor || DataEditor; | ||
@@ -106,3 +112,3 @@ var readOnly = cell && cell.readOnly; | ||
onChange: function onChange(cell) { | ||
return _this2.handleChange(row, column, cell); | ||
return _this2.handleChange(row, column, cell, _this2.getCell, data); | ||
}, | ||
@@ -135,3 +141,4 @@ getValue: getValue | ||
left: dimensions.left, | ||
mode: state.mode | ||
mode: state.mode, | ||
data: state.data | ||
}); | ||
@@ -138,0 +145,0 @@ }; |
@@ -0,1 +1,2 @@ | ||
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray"; | ||
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; | ||
@@ -12,3 +13,3 @@ import * as Types from "./types"; | ||
export function getBindingsForCell(cell) { | ||
export function getBindingsForCell(cell, getCell, data) { | ||
if (!isFormulaCell(cell)) { | ||
@@ -33,7 +34,8 @@ return []; | ||
return { | ||
var bindingsForDependentCell = getBindingsForCell(getCell(row.index, column.index, data), getCell, data); | ||
return [{ | ||
row: row.index, | ||
column: column.index | ||
}; | ||
}, {}); | ||
}].concat(_toConsumableArray(bindingsForDependentCell)); | ||
}, {}).flat(); | ||
} |
@@ -246,4 +246,2 @@ import _regeneratorRuntime from "@babel/runtime/regenerator"; | ||
cell: cell, | ||
column: cellCoord.column.index, | ||
row: cellCoord.row.index, | ||
formulaParser: _this2.formulaParser | ||
@@ -250,0 +248,0 @@ }); |
{ | ||
"name": "@flamy-dev/react-spreadsheet", | ||
"version": "0.4.47", | ||
"version": "0.4.48", | ||
"description": "Simple, customizable yet performant spreadsheet for React", | ||
@@ -5,0 +5,0 @@ "author": "Iddan Aaronsohn <mail@aniddan.com> (https://aniddan.com)", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
148138
2625