ztxkui 4.2.23-344-beta → 4.2.23-345-beta
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.
|
@@ -95,7 +95,14 @@ var TableEnhanceCell = function (_a) {
|
|
|
95
95
|
// 得到过滤数据对应的实际数据的index
|
|
96
96
|
var getRealyIndex = useCallback(function () {
|
|
97
97
|
var newRecords = dataSource ? dataSource() : [];
|
|
98
|
-
var rowKeyIndex = newRecords.findIndex(function (newRecord) {
|
|
98
|
+
var rowKeyIndex = newRecords.findIndex(function (newRecord) {
|
|
99
|
+
if (typeof rowKey === 'string') {
|
|
100
|
+
return (newRecord === null || newRecord === void 0 ? void 0 : newRecord[rowKey]) === (record === null || record === void 0 ? void 0 : record[rowKey]);
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
return rowKey(newRecord) === rowKey(record);
|
|
104
|
+
}
|
|
105
|
+
});
|
|
99
106
|
if (rowKeyIndex !== -1 && isHasFilterRef.current) {
|
|
100
107
|
return rowKeyIndex;
|
|
101
108
|
}
|