material-web icon indicating copy to clipboard operation
material-web copied to clipboard

Add reordering functionality to lists

Open ForestKatsch opened this issue 5 years ago • 1 comments

Is your feature request related to a problem? Please describe. Lists are often reorderable, and list ordering via drag-and-drop is a rather complex and often-used feature that would fit better in this library instead of being reimplemented each time.

Describe the solution you'd like An event, onreordered/reordered, that's sent to the list (or maybe the list item) for each movement. The event would contain information about which mwc-list-item moved, and the index it came from and moved to. Ideally, a parameter on mwc-list-item (reordering?) would be set, so custom mwc-list-item replacement components would be able to change their style and/or layout when being reordered.

Describe alternatives you've considered Building custom list and list-item components to implement this behavior.

Additional context

https://material.io/components/lists/#behavior #525 is potentially related?

ForestKatsch avatar Mar 03 '20 20:03 ForestKatsch

Interesting feature: still currently rethinking the implementation of list so I will keep this in mind

e111077 avatar Mar 04 '20 00:03 e111077