Document how to use secondary actions in lists
See original GitHub issueBug, feature request, or proposal:
Improved documentation
What is the expected behavior?
It should be possible to include one or more buttons (or “infos”) as a secondary action in a list item per the spec.
What is the current behavior?
The List documentation and examples do not show secondary actions.
Is there anything else we should know?
The documentation for Lists in Material 1 show extensive examples, including (at the very end) the use of multiple secondary actions, via the md-secondary
class. I’m guessing this is probably already possible in Material 2 but I can’t figure out how. (For the time being, I’m hacking it together with manual float:right
and some margin twiddling.)
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:10 (2 by maintainers)
Top Results From Across the Web
Have two secondary action elements in a list - Stack Overflow
It is almost sufficient to just put both actions in one ListItemSecondaryAction (as indicated by comments and another answer).
Read more >Primary & Secondary Action Buttons | by Nick Babich | UX Planet
When a Primary Action Is Positive ('Send' or 'Submit') ... The primary action associated shoud have a stronger visual weight. Secondary actions should...
Read more >ListItemSecondaryAction API - Material-UI
The API documentation of the ListItemSecondaryAction React component. Learn more about the props and the CSS customization points.
Read more >Material Design the correct way to work with primary and ...
If I understand correctly the Expand(secondary action) only becomes available ... check this example from MD Lists documentation picture 2.
Read more >Appendix B: Narrator keyboard commands and touch gestures
To view a list of all other keyboard shortcuts in Windows, see Keyboard ... You can use either of these keys in any...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I just came across this issue while trying to reproduce one of the examples of materialjs, specifically the one that @thw0rted pointed out. Would be nice to hear from the dev team if its currently possible to archive the same with the current implementation of
mat-list.
I currently implemented something but I had to invoke stopPropagation to not trigger the “main” action binded to themat-list-item
.Hi,
I think it’s possible if we look at the demo app : https://material2-test.firebaseapp.com/list You can find the linked code over here : https://github.com/angular/material2/blob/master/src/demo-app/list/list-demo.html
Looks like something like this :
<md-nav-list> <md-list-item *ngFor="let link of links"> <a md-line href="http://www.google.com">{{ link.name }}</a> <button md-icon-button (click)="infoClicked=!infoClicked"> <md-icon>info</md-icon> </button> </md-list-item> </md-nav-list>
I think this also work with the classic md-list, not only for the md-nav_list