Skip to content

Commit

Permalink
Fix side nav search.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcenizal committed Feb 21, 2018
1 parent 4a11b94 commit e8a2200
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src-docs/src/components/guide_page/guide_page_chrome.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ export class GuidePageChrome extends Component {

renderSideNav = sideNav => {
// TODO: Add contents pages
return sideNav.map(section => {
const sideNavSections = [];

sideNav.forEach(section => {
const matchingItems = section.items.filter(item => (
item.name.toLowerCase().indexOf(this.state.search.toLowerCase()) !== -1
));
Expand All @@ -118,12 +120,14 @@ export class GuidePageChrome extends Component {
return;
}

return {
sideNavSections.push({
name: section.name,
id: section.type,
items,
};
});
});

return sideNavSections;
};

render() {
Expand Down

0 comments on commit e8a2200

Please sign in to comment.