Open Mamatlatomate opened 4 years ago
Uuu! This is so cool @Mamatlatomate - thanks a lot for sharing!
We're hard at work on 4.1 right now, so I can't give this the attention it deserves, but I'll make a note to take a look at this after we launch 4.1 - and see how and if we should integrate it. Until then, I'm sure some people will run into your code and be grateful, thanks for sharing.
Cheers!
Hello everyone,
I recently need to make a sortable list based on ajax call and potentially contextualized by another field. So i tried something like this :
Basically it's a classic select2_from_ajax widget but which is not saving a relationship. The column need to be a text or json to store the result exactly the same way that the select_and_order field. So it's going to save an array of id's (or model primaryKey) based on the connected_entity.
Sources : To create this, I used the select_2_from_ajax from laravel backpack, turn it to multiple and use this example for turning it to sortable : http://jsfiddle.net/karthi3788/cveekdxy/2/
I don't know if it's an interesting widget to integrate to backpack but I wanted to share it with you. Hope it will help someone :)