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 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; 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] : '';