Skip to content

Commit

Permalink
fix(ui): fix schema registry pagination (#623)
Browse files Browse the repository at this point in the history
  • Loading branch information
PLarboulette authored Mar 9, 2021
1 parent a5efab1 commit de23bf9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions client/src/containers/Schema/SchemaList/SchemaList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,12 @@ class SchemaList extends Root {
endpoints.uriSchemaRegistry(selectedCluster, search, pageNumber)
);

let schemasRegistry = response.data ? response.data.results || [] : [];
this.handleSchemaRegistry(schemasRegistry);
this.setState({ selectedCluster, totalPageNumber: response.page });
if (response.data.results) {
this.handleSchemaRegistry(response.data.results);
this.setState({ selectedCluster, totalPageNumber: response.data.page });
} else {
this.setState({ selectedCluster, schemasRegistry: [], totalPageNumber: 0, loading: false });
}
}

handleSchemaRegistry(schemas) {
Expand Down

0 comments on commit de23bf9

Please sign in to comment.