Skip to content

Commit

Permalink
fixes #26052 - navigation missing IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
glekner authored and Gilad Lekner committed Mar 21, 2019
1 parent 51924b6 commit 051b9d6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -88,7 +88,7 @@
"multiselect": "~0.9.12",
"number_helpers": "^0.1.1",
"patternfly": "^3.58.0",
"patternfly-react": "^2.30.6",
"patternfly-react": "^2.31.1",
"prop-types": "^15.6.0",
"react": "^16.8.1",
"react-bootstrap": "0.32.1",
Expand Down
@@ -1,5 +1,5 @@
import { createSelector } from 'reselect';
import { get } from 'lodash';
import { get, snakeCase } from 'lodash';

export const selectLayout = state => state.layout;

Expand Down Expand Up @@ -27,6 +27,7 @@ const patternflyItems = (data, currentLocation, currentOrganization) => {
const childrenArray = [];
item.children.forEach(child => {
const childObject = {
id: `menu_item_${snakeCase(child.name)}`,
title: child.name,
isDivider: child.type === 'divider' && !!child.name,
className:
Expand Down
Expand Up @@ -97,6 +97,7 @@ Array [
Object {
"className": "",
"href": "/",
"id": "menu_item_dashboard",
"isDivider": false,
"onClick": null,
"preventHref": false,
Expand All @@ -105,6 +106,7 @@ Array [
Object {
"className": "",
"href": "/fact_values",
"id": "menu_item_facts",
"isDivider": false,
"onClick": null,
"preventHref": false,
Expand All @@ -121,6 +123,7 @@ Array [
Object {
"className": "",
"href": "/hosts/new",
"id": "menu_item_all_hosts",
"isDivider": false,
"onClick": null,
"preventHref": false,
Expand All @@ -129,6 +132,7 @@ Array [
Object {
"className": "",
"href": "/architectures",
"id": "menu_item_architectures",
"isDivider": false,
"onClick": null,
"preventHref": false,
Expand All @@ -145,6 +149,7 @@ Array [
Object {
"className": "",
"href": "/environments",
"id": "menu_item_environments",
"isDivider": false,
"onClick": null,
"preventHref": false,
Expand All @@ -153,6 +158,7 @@ Array [
Object {
"className": "",
"href": "/architectures",
"id": "menu_item_architectures",
"isDivider": false,
"onClick": null,
"preventHref": false,
Expand All @@ -169,6 +175,7 @@ Array [
Object {
"className": "",
"href": "/domains",
"id": "menu_item_domains",
"isDivider": false,
"onClick": null,
"preventHref": false,
Expand All @@ -177,6 +184,7 @@ Array [
Object {
"className": "",
"href": "/realms",
"id": "menu_item_realms",
"isDivider": false,
"onClick": null,
"preventHref": false,
Expand Down

0 comments on commit 051b9d6

Please sign in to comment.