From 5839fc515fdb32252320bada5191f196759fc8d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Let=C3=ADcia=20Camara?= Date: Sat, 13 Oct 2018 01:57:49 -0300 Subject: [PATCH 1/3] List only enabled ambassadors --- src/components/pages/AmbassadorsPage.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/pages/AmbassadorsPage.js b/src/components/pages/AmbassadorsPage.js index 0989e31..e72d768 100644 --- a/src/components/pages/AmbassadorsPage.js +++ b/src/components/pages/AmbassadorsPage.js @@ -124,7 +124,8 @@ class AmbassadorsPage extends Component { query: { $sort: { account: 1 }, $limit: limit, - $skip: skip + $skip: skip, + disabled: false } }); total = partialResponse.total; From cb8f0ba3fd5c4950c7e15f0e0430fdc7f9d2163d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Let=C3=ADcia=20Camara?= Date: Sat, 13 Oct 2018 02:04:46 -0300 Subject: [PATCH 2/3] Fix url parser crash when url is not set --- src/utils/url.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/utils/url.js b/src/utils/url.js index 12a4935..ab95c82 100644 --- a/src/utils/url.js +++ b/src/utils/url.js @@ -7,10 +7,12 @@ function addProtocol(url, protocol) { } function stripProtocol(url){ + if(!url) return ''; return url.replace(/(^\w+:|^)\/\//, ''); } function getProtocol(url){ + if(!url) return ''; const values = url.match(/(^\w+:|^)\/\//); return values && (values.length > 0) ? values[0] : ''; From 834f5927070d0f28b5a5d3f185c78f08e83e632d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Let=C3=ADcia=20Camara?= Date: Sat, 13 Oct 2018 02:18:14 -0300 Subject: [PATCH 3/3] Fix search on map when search is deleted --- src/components/EnhancedTable.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/EnhancedTable.js b/src/components/EnhancedTable.js index bb3f6f7..cd7616f 100644 --- a/src/components/EnhancedTable.js +++ b/src/components/EnhancedTable.js @@ -144,6 +144,7 @@ class EnhancedTable extends Component { // If query is empty or undefined if (!query) { this.setState({searchQuery: ''}); + this.props.onSearchChange(this.props.data); return; } // Update the search field as soon as the character is typed