How to REORDER List Items with Drag and Drop | Bubble.io Tutorials

  Рет қаралды 16,143

Jacob Gershkovich

Jacob Gershkovich

Күн бұрын

Пікірлер: 62
@rhardin0104
@rhardin0104 20 күн бұрын
Thanks for the tutorial on this! There is a simpler way to go about creating the re-ordering. This works on any index and does not require another workflow to check for the first or last index. Step 1: Instead of creating a state on the DropArea, create a state on the repeating group called old_order. Step 2: In the workflow, set the state of old_order to This DropArea’s order number Step 3: Make changes to to-do > Thing to change = This DropArea’s ToDo’s. Order Number = Current Workflow’s to-dos order number Step 4: Make changes to to-do > Thing to change = Current Workflow’s to-do’s. Order Number = RepeatingGroup ToDo’s old_order.
@demondragon
@demondragon Жыл бұрын
Wow! Thank you. You took something really overwhelming and challenging, and made it a lot easier. I noticed 2 possible improvements while making my own draggable list: - you don't need to use custom state (I also prefer to avoid it when I can...), you can reference "... :item # (Current cell's index + 1) - I feel like it's better to have the drop area between the questions rather than on top of them. Seems like it's more clear what will happen when you drop a question. In my case I positionned them right after the drag/drop group in the repeat group. And I created another drop area just before the repeat group (if you want to push something in first position)
@remkomooi6040
@remkomooi6040 Жыл бұрын
Great stuff! Very useful. One addition for if you might want to save the list order into a data field on the individual items: At the end of the workflow, 'make a change to a list things' -> select the Repeating Group's list -> select the data field you want to save the order number to (make it a number field, and name it something like 'Final Number') -> Final Number = Repeating Group's list / filtered [order number < This To Do's order number] / count + 1 This way, after each workflow, you're automatically saving each item's order number into a separate data field, which might be useful if you want to display this value independently from the Repeating Group itself.
@BIGALBIGEARS
@BIGALBIGEARS Ай бұрын
Hi, i'm looking to use the final index value of each To Do, to update the sequence number in the data. Can you elaborate on your method? I'm struggling to get this working.
@richardbinnington9740
@richardbinnington9740 Жыл бұрын
Thank you for the thoroughness of this video! I appreciate that you didn't just swap the elements but actaully placed the todo where it was dropped.
@sitedev
@sitedev Жыл бұрын
What a great video. I’m on my third (I think) viewing in as a many months. It’s one of those “every time I watch it I absorb just that little bit more wizardry“ type of videos. Some real brain twisting follow-along logic when tracking and changing order_numbers but, as I said, the more I watch it the more I ‘get it’.
@briggsy9768
@briggsy9768 2 жыл бұрын
Great video, just came across needing to solve this the other day, thanks for covering it. Something I noticed with Bubble's drag/drop plugin is if the list is considerably longer than the viewport height, while click/holding a to-do item, you're unable to move to the top of the list to drop the item. (You can use keyboard arrows or mouse scroll while still in a drag state) Would be great to see your solution to this problem.
@jacobgershkovich
@jacobgershkovich 2 жыл бұрын
Glad it helped! I'll keep that in mind for a future vid.
@Powerplugz
@Powerplugz Жыл бұрын
@@jacobgershkovich Update? Thanks!
@ByronBennett
@ByronBennett 4 ай бұрын
Very helpful video. Many thanks! I think there is a problem. When you change the behavior of dropping on the First item, you eliminate the ability to drop something into the 2nd Position. You really need to be able to drop something in the 0th position (which does not exist) in order to place it before the first. The initial behavior was that you always placed the item after the place it was dropped. After you made the change to dropping on the first item, now it places before that, leaving a hole in the logic so that you can't drop anything between position 1 and 2.
@ByronBennett
@ByronBennett 4 ай бұрын
I may be wrong, but it seems that to get the correct behavior, you need a drop area for the top half of a cell to drop something before it, and a drop area for the 2nd half of the cell to drop after it.
@camilordofficial
@camilordofficial 8 күн бұрын
thanks dude!! will try it soon.
@christopheracle7777
@christopheracle7777 9 ай бұрын
Really nice video, 2 days I m trying to make it working , I have same issue as other with the moving items down, seems I have to go 2 drop area above (reducing position id) to move the item in correct place and can t drag to last position and first one. I review the video few times and seems everything is correct.
@medimory
@medimory 10 ай бұрын
Nice! Only one problem I think, you suppose that "next index"="current cell's index +1" but it can be the average of 2 numbers if he has already changed place before.
@a_pellan_en
@a_pellan_en Жыл бұрын
Thank you for all your videos!! Do you know how to make the page scroll when an element is dragged ?
@thedougler604
@thedougler604 2 жыл бұрын
This is super helpful. Thanks. I was concerned with re-numbering all of the elements in the list. I wonder if it would be possible to add a secondary sort on the list of todos to make the done status the primary sort, and the order_number the secondary sort. This way, you would be able to maintain the order number when an item is unchecked.
@samueljara5397
@samueljara5397 2 жыл бұрын
Amazing video! 🙏 I have a question. Is possible reorder entries of list? I have a field with multiple entries.
@jacobgershkovich
@jacobgershkovich 2 жыл бұрын
Thank you! I'm not sure I fully understand the question 🤔
@Nick-kp7iw
@Nick-kp7iw 2 жыл бұрын
Worked amazing - one item that is probably simple, but I'm at a loss, how to make a header that scroll left to right when responsive/mobile within this drag & drop solution.
@jacobgershkovich
@jacobgershkovich 2 жыл бұрын
Not exactly sure what you mean!
@ricardobarbosa7622
@ricardobarbosa7622 2 жыл бұрын
Thanks 🙏 It helped a lot with an ongoing application development!
@jacobgershkovich
@jacobgershkovich 2 жыл бұрын
Great to hear!
@dextersl2
@dextersl2 11 ай бұрын
Excellent tutorial! Thanks
@raphaelomoreira
@raphaelomoreira Жыл бұрын
Can this same condition be applied to an up and down button to change the position of tasks?
@NadeemWBR
@NadeemWBR Жыл бұрын
Thanks Jacob, It's Awesome.... Thanks teaching in a simple way... 😘
@jacobgershkovich
@jacobgershkovich Жыл бұрын
Glad you found it helpful!
@joelsonsouza
@joelsonsouza Жыл бұрын
Drag/Drop group doesn’t stay in the Drop area, it jumps back to the its original position (unlike the desired effect as you show us at 4:29). Behavior post drop is "hide group" and "make this element droppable" is checked off. What am I doing wrong?
@deisok95
@deisok95 Жыл бұрын
same issue.
@jacobgershkovich
@jacobgershkovich Жыл бұрын
Very hard to say without seeing the editor and how you've set things up. I'd recommend posting in the forum with screenshots!
@demondragon
@demondragon Жыл бұрын
Try right clicking on the droparea and "bring to front".
@GrahamRusson
@GrahamRusson 2 жыл бұрын
Great video, well presented, to the point and extremely useful
@jacobgershkovich
@jacobgershkovich 2 жыл бұрын
Glad it was helpful!
@vitormeyer9782
@vitormeyer9782 2 жыл бұрын
I thought the video was excellent and managed to apply it well! I want to ask for help with a situation. Following the example, I would like each task to have a button on the side that when clicked would reveal a repeating group of subtasks and I could order them and edicts. Is it possible to do that?
@jacobgershkovich
@jacobgershkovich 2 жыл бұрын
Yup! Definitely possible.
@vitormeyer9782
@vitormeyer9782 2 жыл бұрын
got it here! my editor needed a f5 haha, i put a button that reveals a group with the sub items and redo the steps. Do you know if I can, at the end of changing the items, have a button that writes the value of the curent cell index in the order field? I wanted at the end of the edit to save the integer values ​​to make it more elegant.
@jacobgershkovich
@jacobgershkovich 2 жыл бұрын
Definitely sounds doable!
@philipppo1991
@philipppo1991 Жыл бұрын
Dear Mr. Gershkovich, amazing content Thank You! Im binge-watching your entire channel. I have this issue: if I move,say, 5 to 2 - Number 5 will just get assigned 2.5 order_number (just +0.5). So when I drag and drop To Do's - I only see the changes to the item that im dropping and it just changes it to the Item it was dropped to + 0.5. Is there any chance you could help figure out what's happening, off-the-cuff, at a glance.. Appreciate your work!
@jacobgershkovich
@jacobgershkovich Жыл бұрын
Thanks! Really hard to tell without seeing the editor but the first thought that comes to mind is that you're calculating using the index instead of a rank field?
@philipppo1991
@philipppo1991 Жыл бұрын
@@jacobgershkovich thank you!
@DouglasTybel
@DouglasTybel Жыл бұрын
Muito obrigado, me ajudou muito e funcionou!
@01carlovsk
@01carlovsk 9 ай бұрын
Opa Douglas, como funcionou no seu? Ja fiz tudo aqui, mas ainda nao funciona no meu
@pingubustanut6530
@pingubustanut6530 Жыл бұрын
If you want to be able to drag items upwards you need to only increment the state of next_index when current workflow's to do < this dropdown's next index
@aharnisch3
@aharnisch3 Жыл бұрын
Can you explaiin this a bit more? I am running into this issue but can't figure it out. EDIT: I got it! I followed the exact instructions from the video, but added a small change to next_index custom state: 1. Custom State next_index = current cell's index + 1 ONLY WHEN current workflow's todo order_number < current cell's todo order_number. 2. Custom State next_index = current cell's index - 1 ONLY WHEN current workflow's todo order_number > current cell's todo order_number. In other words, if we're dragging down, the next_index should be the row beneath the current cell. But if we're going up, the next_index should be the row ABOVE the current cell. Now it is working perfectly. Thanks!!
@MikeHollywood1
@MikeHollywood1 Жыл бұрын
@@aharnisch3 thank you for this! works flawlessly.
@MyDavid57
@MyDavid57 Жыл бұрын
@@aharnisch3 Thanks Al Harnisch & Jacob, it's work fine
@01carlovsk
@01carlovsk 9 ай бұрын
hey man, i did everything in the video but it still didn't work, can you help me?
@reginaldbrooks2981
@reginaldbrooks2981 Жыл бұрын
Do you do coaching sessions?
@jacobgershkovich
@jacobgershkovich Жыл бұрын
Not at the moment but that might change soon!
@netotjb
@netotjb 2 жыл бұрын
Olá, aqui funcionou praticamente tudo, a única opção que não funciona é que eu não consigo jogar nada na segunda posição, ou seja, se eu preciso mexer no segundo item, tenho que tirar ele porque não consigo jogar outros para o lugar dele. Eu fiz algo errado ou aí também ocorre isso?
@jacobgershkovich
@jacobgershkovich 2 жыл бұрын
Google translate is telling me that this almost worked for you but that you're having one small issue. Very hard to say what that might be without diving into the editor! I'd post your question on the Bubble forum!
@alexlefkowitz
@alexlefkowitz 2 жыл бұрын
Thanks for this 🙏
@jacobgershkovich
@jacobgershkovich 2 жыл бұрын
My pleasure 😊
@baloshi69
@baloshi69 2 жыл бұрын
Useing decimal number to beable to order you list, will cause problems in real life scenarios. Like, I am building a Trello clone, where user can drag and drop both list and item in list. So user is also be able to drag a item from one list and drop it inside another.
@jacobgershkovich
@jacobgershkovich 2 жыл бұрын
I don't think that should be a problem with this system? What challenges are you running into?
@netotjb
@netotjb 2 жыл бұрын
Acho que você resolveu meu problema.... Amanhã vou testar
@hayttlesds
@hayttlesds 7 ай бұрын
Make more sense store previous index in custom state and replace item before DropArea.
@VivekYadav-kq6dr
@VivekYadav-kq6dr 2 жыл бұрын
yes
@MarcusParry
@MarcusParry Жыл бұрын
Thank you Jacob - this tutorial has been really helpful. I'm getting the issue mentioned by @pingbustanut6530 were dragging up doesn't always work (in particular to be first in the list) and also noticing periodic strange behaviour when dragging down (in particular to last in the list). Could either of you elaborate on the exact configuration settings of the suggested fix of "only increment the state of next_index when current workflow's todo is < than this dropdown next index2", as it's just a bit beyond my grasp at the moment? Also, am I right in thinking if I wanted to have the Order_number values reset to whole numbers periodically this could / should be done via an API call? Thanks!
@jacobgershkovich
@jacobgershkovich Жыл бұрын
Hey Marcus, Thanks for the comment and glad you found this helpful! Really tough to say what might be happening in your case without looking at the editor. I'd recommend taking this question to the Bubble forum and posting screenshots of your workflows / expressions. Regarding the order numbers resetting, a number of ways you could approach that but using a backend workflow seems like it could be a good option.
@MarcusParry
@MarcusParry Жыл бұрын
@@jacobgershkovich You're right, that would be a better way to go about it. I'll post it in the forum if I can't resolve it soon. And noted about the w/f. Thanks
@demondragon
@demondragon Жыл бұрын
Try right clicking on the droparea and "bring to front".
How to Save Data From an API to Your Bubble Database | Bubble.io Tutorials
12:17
Learn Bubble.io in 30 Minutes
28:45
Jesse Showalter
Рет қаралды 102 М.
How to whistle ?? 😱😱
00:31
Tibo InShape
Рет қаралды 17 МЛН
Osman Kalyoncu Sonu Üzücü Saddest Videos Dream Engine 269 #shorts
00:26
Bubble for Beginners: How to Get Started With Your First No Code App
57:42
Coaching No Code Apps
Рет қаралды 9 М.
Recursive workflows in Bubble (OR, HOW TO LOOP THROUGH A LIST)
34:27
How to Bubble: Reorder list in Bubble.io (reorder repeating group)
13:47
Best Bubble Developer
Рет қаралды 8 М.
How To Get A Users IP Address In Bubble.io + Capturing Their Location
19:06
Building With Bubble
Рет қаралды 4,6 М.
How To Build An Overlapping Repeating Group In Bubble.io (Complete Guide)
14:36
Design awesome tables in Bubble.io | Tutorial
25:33
Buildcamp
Рет қаралды 36 М.
How To Build Sortable Drag & Drop With Vanilla Javascript
22:22
Web Dev Simplified
Рет қаралды 334 М.
Bubble: How to build a Kanban board
20:30
Crafting Clouds
Рет қаралды 1 М.
How to create Multi Image Uploader in Bubble.io
17:47
Thilak S
Рет қаралды 4,4 М.
How to whistle ?? 😱😱
00:31
Tibo InShape
Рет қаралды 17 МЛН