Sortable icon indicating copy to clipboard operation
Sortable copied to clipboard

Is there any way to limit the amount of items in a list?

Open colorsnare opened this issue 9 years ago • 3 comments

Hi,

I'm using sortablejs and i love it so far! I'm just wondering if there is a way too limit the amount of items that can be placed in a list at one time?

colorsnare avatar Aug 13 '17 10:08 colorsnare

Hmm, i was a bit too hasty with posting my question it seems... ;) Just found a way. If anyone is curious, i simply check the length of the list array and then change 'put' value in options to false or true according to the length.

colorsnare avatar Aug 13 '17 11:08 colorsnare

Please can you post your code so we can understand what you were trying to communicate

sesan avatar Dec 09 '17 12:12 sesan

You can also set put to a function to check this

owen-m1 avatar Dec 24 '18 16:12 owen-m1