This can be very expensive to always trigger setState this often, especially if not using one of these methods (and isCellHovered is not required for row hovering now since we can use CSS and :hover.
While we could disable the onMouseEnter/onMouseLeave ourselves...
maybe this should be an opt-in behavior instead (trackHovered prop or something). Initially I thought this could be done only if isCellHovered was set, but since these are also passed to the cellProps I don't know if it would make sense to require isCellHovered as well.
Currently we always wire up
onMouseEnter
/onMouseLeave
on all [cells (https://github.com/techniq/mui-table/blob/master/src/index.js#L140) to trackhoveredColumn
/hoveredRowData
which is used forisCellHovered
along withcellProps
/headerCellProps
/bodyCellProps
.This can be very expensive to always trigger
setState
this often, especially if not using one of these methods (andisCellHovered
is not required for row hovering now since we can use CSS and:hover
.While we could disable the onMouseEnter/onMouseLeave ourselves...
maybe this should be an opt-in behavior instead (
trackHovered
prop or something). Initially I thought this could be done only ifisCellHovered
was set, but since these are also passed to thecellProps
I don't know if it would make sense to requireisCellHovered
as well.