From 1de1fc7542b544ae59b33c3c18508cc681834ef3 Mon Sep 17 00:00:00 2001 From: Alex P Date: Mon, 9 Jul 2018 15:31:23 -0700 Subject: [PATCH] Limit re-rendering of table row --- .../components/chronograf/AllUsersTableRow.tsx | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/ui/src/admin/components/chronograf/AllUsersTableRow.tsx b/ui/src/admin/components/chronograf/AllUsersTableRow.tsx index 29899a6ba2..326b55334e 100644 --- a/ui/src/admin/components/chronograf/AllUsersTableRow.tsx +++ b/ui/src/admin/components/chronograf/AllUsersTableRow.tsx @@ -1,4 +1,4 @@ -import React, {PureComponent} from 'react' +import React, {Component} from 'react' import _ from 'lodash' import Tags from 'src/shared/components/Tags' @@ -47,7 +47,20 @@ interface Props { } @ErrorHandling -export default class AllUsersTableRow extends PureComponent { +export default class AllUsersTableRow extends Component { + public shouldComponentUpdate(nextProps) { + if ( + _.isEqual( + _.omit(nextProps.user, 'superAdmin'), + _.omit(this.props.user, 'superAdmin') + ) + ) { + return false + } + + return true + } + public render() { const {user, onRemoveFromOrganization, onAddToOrganization} = this.props