This video covers implementing Admin only Drag and Drop using Stimulus JS because I ran into one too many JQuery solutions. The gist below has the stimulus controller code!
Linktree Clone Course: https://learn.deanin.com/courses/buil...
Gist: https://gist.github.com/Deanout/dc08f...
Source: https://github.com/Deanout/blog_appli...
Join this channel to help support these videos:
/ @deanin
Follow me on social media:
https://linktr.ee/deanin
Join this channel to get access to perks:
/ @deanin
If you liked this video, please consider subscribing: https://t.co/RZ4EwP0F2a
Timestamps
0:00 Drag And Drop In Rails 7
1:58 Adding The Acts_As_List Gem
2:11 Generate The Rails Drag Controller
2:24 Create The Rails Drag And Drop Stimulus Controller
3:01 Drag And Drop Rails Migration For Position
5:17 Setup The Frontend View For Admin Only Drag And Drop
11:54 Creating The Stimulus Drag And Drop Logic
13:34 Drag Start Method
16:39 Drop Method
24:31 Save To Database On Drag End Method
29:33 Update List Order In Database After Drag And Drop
31:53 Use Updated List Order To Render Items On Page
#Deanin #Software #Programming
Смотрите видео Drag And Drop With Stimulus JS | Intro To Ruby On Rails 7 Part 22 онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Deanin 01 Январь 1970, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 5,249 раз и оно понравилось 85 людям.