Sortable: Disabling nested sortable lists

Created on 4 Jun 2019  路  4Comments  路  Source: SortableJS/Sortable

Hello,

can someone help me to disable making nested sortables in this list

https://jsbin.com/juqosoyeni/1/edit?html,css,js,console,output

I'd like to move items from group 1 fo/from group 2 and to/from root list, but i don't want to make nested groups in Group 1, Group 2. Group 1, Group 2 can be moved only in root list.

Thanks

Most helpful comment

@tonykor You would do something like this: https://jsbin.com/xemahijinu/2/edit?js,output

For disabling items from dragging, use the filter option: https://sortablejs.github.io/Sortable/#filter

All 4 comments

You can use pull/put logic for this: https://github.com/SortableJS/Sortable/blob/master/README.md#group-option

@owen-m1 Thanks. But when i'm using pull/put options, i can't put to the list any other items, but i need to put other items except other sortable lists.

BTW. Do you know is it possible to disable some items from dragging ?

@tonykor You would do something like this: https://jsbin.com/xemahijinu/2/edit?js,output

For disabling items from dragging, use the filter option: https://sortablejs.github.io/Sortable/#filter

thanks, it works

Was this page helpful?
0 / 5 - 0 ratings

Related issues

geonanorch picture geonanorch  路  3Comments

kaermomo picture kaermomo  路  3Comments

rakeshrockb picture rakeshrockb  路  3Comments

FINDarkside picture FINDarkside  路  3Comments

PanzerKunst picture PanzerKunst  路  4Comments