Skip to content

Commit

Permalink
Merge pull request #6307 from WiXSL/fix-unnecesary-computations
Browse files Browse the repository at this point in the history
Fix prevent unnecessary DatagridRow computations
  • Loading branch information
djhi authored May 25, 2021
2 parents ccbcd5c + b36cdf4 commit bdbf519
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const DatagridRow: FC<DatagridRowProps> = React.forwardRef((props, ref) => {
expand;
const resource = useResourceContext(props);
const [expanded, toggleExpanded] = useExpanded(resource, id);
const [nbColumns, setNbColumns] = useState(
const [nbColumns, setNbColumns] = useState(() =>
computeNbColumns(expandable, children, hasBulkActions)
);
useEffect(() => {
Expand Down

0 comments on commit bdbf519

Please sign in to comment.