fix(Table): correct lint errors

This commit is contained in:
kristof0425 2019-09-02 11:27:36 +02:00 committed by 偏右
parent 3274c55bdf
commit 18017d6ea5

View File

@ -89,7 +89,7 @@ const defaultPagination = {
*/
const emptyObject = {};
let row: BodyRowClass | undefined;
let tableRow: BodyRowClass | undefined;
const createComponents = (
components: TableComponents = {},
@ -99,17 +99,17 @@ const createComponents = (
const bodyRow = components && components.body && components.body.row;
const prevBodyRow = prevComponents && prevComponents.body && prevComponents.body.row;
if (isCalledFromConstructor) {
// 'row' needs to act like a class property
row = undefined;
// 'tableRow' needs to act like a class property
tableRow = undefined;
}
if (!row || bodyRow !== prevBodyRow) {
row = createBodyRow(bodyRow);
if (!tableRow || bodyRow !== prevBodyRow) {
tableRow = createBodyRow(bodyRow);
}
return {
...components,
body: {
...components.body,
row,
row: tableRow,
},
};
};