@builttocreate/engine-utils 1.8.1-rc.1.2.4 → 1.8.1-rc.1.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tableHelper.js +10 -1
- package/package.json +1 -1
package/dist/tableHelper.js
CHANGED
|
@@ -727,17 +727,26 @@ var getRowLookupWithPopulatedDropdownCells = function getRowLookupWithPopulatedD
|
|
|
727
727
|
var rowsLookup = {};
|
|
728
728
|
var tableLookup = generateTableLookup(rows, columns);
|
|
729
729
|
var validRows = typeof row === 'string' ? JSON.parse(rows) : rows;
|
|
730
|
+
var validColumns = columns.filter(function (column) {
|
|
731
|
+
return !column.deleted;
|
|
732
|
+
});
|
|
733
|
+
console.log('validRows', validRows);
|
|
734
|
+
console.log('validColumns', validColumns);
|
|
730
735
|
validRows.forEach(function (row, rowIndex) {
|
|
731
736
|
var nextRow = _objectSpread(_objectSpread({}, row), {}, {
|
|
732
737
|
cells: _objectSpread({}, row.cells)
|
|
733
738
|
});
|
|
734
739
|
|
|
735
|
-
|
|
740
|
+
validColumns.forEach(function (column, i) {
|
|
736
741
|
var optionId = nextRow.cells[column._id];
|
|
737
742
|
|
|
738
743
|
if (optionId && optionId.charAt(0) === '=' && column.type === _FieldTableColumnTypes["default"].text) {
|
|
739
744
|
var columnOperand = getColumnOperand(i);
|
|
740
745
|
var cellOperand = getCellOperand(columnOperand, rowIndex + 1);
|
|
746
|
+
console.log('columnOperand', columnOperand, i);
|
|
747
|
+
console.log('cellOperand', cellOperand);
|
|
748
|
+
console.log('endResult', tableLookup, tableLookup[cellOperand]);
|
|
749
|
+
console.log('*****************************************************');
|
|
741
750
|
nextRow.cells[column._id] = tableLookup[cellOperand];
|
|
742
751
|
} else if (optionId && column.type === _FieldTableColumnTypes["default"].dropdown) {
|
|
743
752
|
nextRow.cells[column._id] = column.optionsLookup[optionId] ? column.optionsLookup[optionId].value : optionId;
|