problem description
getModelVersion () backend request data
Parameter limit
getCurrentData has only one parameter record
related codes
getCurrentData = (record) => {
const { searchParams } = this.state;
const params = {
status: searchParams.status,
modelId: record.id,
};
getModelVersion(params).then((result) => { //
if (result.length > 1) {
return "";
} else {
return styles.disabledRow;
}
});
}
Table in render
<Table
className={styles.subTable}
dataSource={this.state.SampleData}
....
....
expandedRowKeys={expandedRowKeys}
onExpandedRowsChange={this.onExpandedRowsChange}
rowClassName={(record) => { return this.getCurrentData(record); }} //
/>
what is the result?
getCurrentData returns undefined