Sortable: Set maximum number of items for a list?

Created on 7 Jan 2016  路  3Comments  路  Source: SortableJS/Sortable

Would it be possible to set a maximum number of items for a list? I'm using two separate lists -- a master and a user-selected list. I'd like to allow the user to move or clone a maximum of five items from the master list to the user-selected list. Thanks for the great tools.

question

All 3 comments

The link provided no longer works, and the solution isn't explained anywhere. Can anyone elaborate on how to create groups with a set maximum length?

@LeszekKicior The demo in the README has this example: https://jsbin.com/nacoyah/edit?js,output

The last qux Sortable will stop allowing items once it reaches a max length of 4 items.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

graemegeorge picture graemegeorge  路  4Comments

binitghetiya picture binitghetiya  路  4Comments

irfanlone picture irfanlone  路  3Comments

chrishaigy picture chrishaigy  路  3Comments

geonanorch picture geonanorch  路  3Comments