fix(table): fix table column rerendered whenever table updates

- Fix table column rerendered whenever table updates
This commit is contained in:
jeremywu 2021-04-14 11:21:04 +08:00 committed by GitHub
parent 634448d756
commit cc988f9ac1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -101,11 +101,13 @@ function useRender(props: TableBodyProps) {
}
}
}
const key = `${$index},${cellIndex}`
return h(
'td',
{
style: getCellStyle($index, cellIndex, row, column),
class: getCellClass($index, cellIndex, row, column),
key,
rowspan,
colspan,
onMouseenter: $event => handleCellMouseEnter($event, { ...row, tooltipEffect }),