Skip to main content
← Design & Bravo Tags
Design & Bravo Tags September 29, 2023 · 4 replies

Drag and drop - Sortable list (with "[sortable]" tag) not working

Archived from the Bravo community forum (2021–2026). Some answers may refer to older versions of Bravo.

Has anyone tried to implement a sortable list through drag and drop with the “[sortable tag]”?

I’ve been trying to implement the “sortable” tag (as directed in Bravo’s documentation) with no success… I’m working with Xano and managed to clone the Xano Snippet offered in the documentation, but cannot make it work…

I’m sending the “tasks_id” parameter through URL, though I cannot manage to make it work…

Is this feature actually working? Or is it something I’m doing wrong?

Anybody to help please?

Thanks!
🆘🆘🆘

4 replies

Fernando October 2, 2023

Might it be related to the "${movedAfterItemId?}" variable always sending "null"? Should't it send the ID of the previous item of the one being moved?

Might the variable not be working fine? Or I'm I doing something wrong?  🤔  🤔 

Has anybody gone through this? 
Anybody help?

🆘🆘🆘 

Screenshot_2023-10-02-11-18-26-913_com.appfoundry.previewer.png

Captura de pantalla 2023-10-02 112057.png

Molly October 4, 2023

hi Fernando!!
...thank you so much for sharing your experience with this function!! 
...i had been trying to get this to work for a long time and found a couple ideas to try out. 

...i am so new in this magnificent coding realm and by no means know whether this would be a fool proof solution but i found it to work most of the time.
...i will list some of the settings i changed and will attach a couple screenshots of my xano and bravo settings too....i would love to share them with you and please please let me know if you have any ideas, suggestions, corrections!! 

…for the null workaround, i changed the Xano Inputs setting for previous_tasks_id to:
“no” in the upper right “required” dropdown.
and
“no” for the center nullable dropdown.

…i found that my when i dragged the item it was off…usually by 1 so in the first Conditional function where Update Variable 
var: previous_position = var: previoustTask.position  
i added a value of 1 to the new variable making it
var: previous task.positionIadd

…i also attached the screenshot of the PUT settings in Bravo that i have been using just in case.

…i believe that is all i did but still feel there may have been something more that i adjusted…. i know i was trying to make sure that the position numbers in the database didn’t keep going higher and higher but rather bounced themselves back so that position 1 would keep starting back from 1 however i think that might already have been coded into their function or by the altering of with Nullable = no on the previous_taks_id input settings.

…when i was testing the sorting in Bravo Vision i noticed that sometimes it wouldn’t catch the new position in the database even though it moved on my phone screen and i think that might happen when i was too quick to drag on the screen and not carefully moving the item.

…i truly hope that this works for you and please let me know your thoughts!!
…thank you so much for taking the time to correspond about this!!
…wishing you lots of moonlight!!
molly

Marta Serrano Bravo team October 6, 2023

Hello  ! We are looking into that, we found some issues on that tutorial. We will update it and share it with you.
Thank you for raising that up and sorry for the inconvenience.

Wrote something in this thread and want it removed? Request removal

Still stuck?

Ask the community on Discord

This archive is read-only. New questions, office hours and product updates now happen in the Bravo Discord.

Join the Discord