Comparing version 11.1.1 to 11.1.2
@@ -56,3 +56,3 @@ "use strict"; | ||
var rowRefLink = firstRowRef; | ||
return (react_1.default.createElement(react_1.default.Fragment, null, data.map(function (d) { | ||
return (react_1.default.createElement(react_1.default.Fragment, null, data.map(function (d, index) { | ||
if (d.groupMark === groupMark) { | ||
@@ -78,3 +78,3 @@ var groupIndex = d.key.length - 1; | ||
var isOdd = oddEvenRows | ||
? isFirstRowOdd ? (0, DataUtils_1.checkRowOdd)(data, rowData) : !(0, DataUtils_1.checkRowOdd)(data, rowData) | ||
? isFirstRowOdd ? (0, DataUtils_1.checkIndexOdd)(index) : !(0, DataUtils_1.checkIndexOdd)(index) | ||
: undefined; | ||
@@ -81,0 +81,0 @@ var dataRow = (react_1.default.createElement(DataAndDetailsRows_1.default, { isOdd: isOdd, childComponents: props.childComponents, columns: props.columns, dispatch: dispatch, editableCells: props.editableCells, editingMode: props.editingMode, isTreeGroup: isTreeGroup, isTreeExpanded: isTreeExpanded, treeDeep: isTreeRow === true ? d.treeDeep : undefined, treeExpandButtonColumnKey: treeExpandButtonColumnKey, format: format, groupColumnsCount: props.groupColumnsCount, isDetailsRowShown: isDetailsRowShown, isSelectedRow: isSelectedRow, key: rowKeyValue_1, rowData: rowData, rowEditableCells: rowEditableCells, rowKeyField: props.rowKeyField, rowKeyValue: rowKeyValue_1, rowReordering: rowReordering, selectedRows: props.selectedRows, trRef: rowRefLink, validation: validation })); |
{ | ||
"name": "ka-table", | ||
"version": "11.1.1", | ||
"version": "11.1.2", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "repository": "github:komarovalexander/ka-table", |
@@ -11,2 +11,2 @@ import { Column } from '../Models/Column'; | ||
export declare const reorderData: (data: any[], getKey: (d: any) => any, keyValue: any, targetKeyValue: any) => any[]; | ||
export declare const checkRowOdd: (data: any[], rowData: any) => boolean; | ||
export declare const checkIndexOdd: (index: number) => boolean; |
@@ -23,3 +23,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.checkRowOdd = exports.reorderData = exports.insertBefore = exports.reorderDataByIndex = exports.replaceValue = exports.getValueByField = exports.getValueByColumn = exports.createObjByFields = exports.getParentValue = void 0; | ||
exports.checkIndexOdd = exports.reorderData = exports.insertBefore = exports.reorderDataByIndex = exports.replaceValue = exports.getValueByField = exports.getValueByColumn = exports.createObjByFields = exports.getParentValue = void 0; | ||
var ColumnUtils_1 = require("./ColumnUtils"); | ||
@@ -111,5 +111,5 @@ var getParentValue = function (rowData, fieldParents) { | ||
exports.reorderData = reorderData; | ||
var checkRowOdd = function (data, rowData) { | ||
return (data === null || data === void 0 ? void 0 : data.indexOf(rowData)) % 2 !== 0; | ||
var checkIndexOdd = function (index) { | ||
return index % 2 !== 0; | ||
}; | ||
exports.checkRowOdd = checkRowOdd; | ||
exports.checkIndexOdd = checkIndexOdd; |
@@ -44,3 +44,3 @@ "use strict"; | ||
isFirstVisibleRowOdd: oddEvenRows | ||
? (0, DataUtils_1.checkRowOdd)(data, virtualizedData[0]) | ||
? (0, DataUtils_1.checkIndexOdd)(data === null || data === void 0 ? void 0 : data.indexOf(virtualizedData[0])) | ||
: undefined | ||
@@ -47,0 +47,0 @@ }; |
396800