From f525d6ef40a0d50b15be40f24c6bb81f2c056aaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Let=C3=ADcia=20Camara?= Date: Mon, 29 Oct 2018 16:10:08 -0300 Subject: [PATCH] Fix ambassador's nickname search --- src/components/EnhancedTable.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/EnhancedTable.js b/src/components/EnhancedTable.js index cd7616f..56f7cb8 100644 --- a/src/components/EnhancedTable.js +++ b/src/components/EnhancedTable.js @@ -93,8 +93,8 @@ class EnhancedTable extends Component { const data = order === 'desc' - ? this.state.data.sort((a, b) => (b[orderBy] < a[orderBy] ? -1 : 1)) - : this.state.data.sort((a, b) => (a[orderBy] < b[orderBy] ? -1 : 1)); + ? this.state.data.sort((a, b) => (b[orderBy].toLowerCase() < a[orderBy].toLowerCase() ? -1 : 1)) + : this.state.data.sort((a, b) => (a[orderBy].toLowerCase() < b[orderBy].toLowerCase() ? -1 : 1)); this.setState({ data, order, orderBy }); };