[Nav] Item Groups option to not expand on click
I have a Nav structure where I don't want my parent ItemGroups navigating to a new page or picking up the Active style as they are purely categories and I want the user selecting something under them to proceed. The current behavior (as of 1.7.0) is to only expand an Item Group when the accompanying arrow is clicked and the Active status is set to true on click.
I'd like to propose an option for the ItemGroup that puts it into a mode where:
- Clicking anywhere on the object area (i.e. arrow or label) will toggle the isExpanded status
- The Active flag will stay false
This would be in line with other Web UI frameworks such as Bootstrap or Foundation.
Nav component actually support TRUE group header just for category and owning child links. Then each link can be level 1 (parent) link or level 2 (child) link.
Just in SP UX LeftNav, design choose not to show Group Header and only Level 1 and Level 2 links. My question to you is that you wish SP LeftNav can host level 1 "link" that only serve as heading not real link?
Or you are talking about Nav component used elsewhere in general?
INavLinkGroup currently is serve what you are asking just it is not used in our SP modern page LeftNav. That is why I am asking if you are asking for SP UX leftNav can support you with this heading or Nav component in general Level 1 link can be just header with no navigation on click?
Yes, I'd like to have a group header to be only a header and not navigate. How does that work? I don't see anything in the documentation that addresses that.
I'm not sure what you're asking here though, could you please reword it?
I am asking if you are asking for SP UX leftNav can support you with this heading or Nav component in general Level 1 link can be just header with no navigation on click?
INavLinkGroup is only header. Not a link.
The documentation is really unclear on how this works. Could we add more detail to that page to explain this?
OK I will try to update if you got to below link https://fabricreact.azurewebsites.net/fabric-react/master/#/examples/nav
Fabric sample page. The LeftNav here is organized under Group headers that seem what you are looking for?
I get this error when I try to visit that link:
Sorry, but we’re having trouble signing you in. We received a bad request.
I am using Edge with an Azure AD account.
Is there any way to see an example?
I'm using ES6 and not TypeScript btw. Is this only a TypeScript feature?
https://dev.office.com/fabric#/components/nav
try this link?
Yes, that link works. I didn't see any specific examples of what you were mentioning on that page.
Here is how I'm defining my groups, how can I change this to reflect a Group header without link?
let groups = [{
links: [
{
name: 'A',
icon: 'Stopwatch',
links: [{
name: 'A1',
key: 'key1'
},
{
name: 'A2',
key: 'key2'
}
]
},
{
name: 'B',
icon: 'Edit',
links: [{
name: 'B1',
key: 'key1'
},
{
name: 'B2',
key: 'key2'
}
]
},
{
name: 'C',
icon: 'People',
links: [{
name: 'C1',
key: 'key1'
},
{
name: 'C2',
key: 'key2'
}
]
}
]
}];
Try this out if you add a group name, it will render group header.
Thank you, that changed the output to match the "Navigation menu used in this Fabric React demo app" example. However, I see four key formatting problems:
- The text is all caps which doesn't meet our UX guidelines,
- I can no longer display an icon next to the label,
- There is a lot of white space below the last item in a group, and
- Every item starts expanded and doesn't respond to the isExpanded property
The Office 365 Admin portal is what I'm trying to emulate. It is very intuitive, is nice and simple to use, and looks great too:
https://portal.office.com/adminportal/home#/homepage
I am looping in David. We can adjust group header style since we did not get a lot feedback or you can override css style of group header. As for icon, I am not sure what you mean the link with icon?
@graham-sportsmgmt I will talk with @inateeg . I believe i understand what you're saying. We'll either translate this into a codepen, or get a feature request going.
Thanks, I think that the feature request could be as simple as giving us the ability to configure Nav to work exactly like the Office 365 Admin portal's left hand navigation.
are you saying UI like this page?
https://portal.officeppe.com/account/#settings
I don't see any attachments, although it looks like you did try to add one.
https://portal.officeppe.com/account/#settings you meant this page? this one?