Rails

Sdílet
Vložit
  • čas přidán 8. 05. 2024
  • Previously we created a table that we can search and sort using gem Ransack, and paginate using gem Pagy.
    We also made results update without page refresh using Hotwire Turbo Frames.
    Now let's go DEEPER and have search in the navbar and FILTERS in the sidebar.
    To do this, we will have to have HTML form fields OUTSIDE of a form. This is an HTML and ERB challenge.
    We will also cover
    - form.select vs select vs select_tag
    - radio_buttons
    - collection_check_boxes
    And this is what I call LAYERED DESIGN. PROGRESSIVE ENCHANCEMENTS. STEP BY STEP.
    Episode source code: github.com/corsego/147-datata...
    0:00 Final demo, Filters examples
    2:40 Multiselect
    4:26 Multiselect checkboxes
    7:40 Sidebar
    8:46 Form Fields outside Form?
    11:30 IT'S AMAZING
    11:54 Select in sidebar
    12:54 Radio buttons in sidebar
    17:20 Dive deeper: Form Select vs Select vs SelectTag

Komentáře • 7

  • @wdlpl
    @wdlpl Před 6 měsíci +1

    Thx for very usefull tutorials.

  • @gosseynx
    @gosseynx Před 6 měsíci

    After your video I rewrited much of my admin pages much more efficiently. Many thanks Yaroslav !

  • @Casanovajosh
    @Casanovajosh Před 6 měsíci +1

    Great one!!

  • @volodymyrshabaldas6349
    @volodymyrshabaldas6349 Před 6 měsíci +1

    🔥🔥🔥

  • @rusasd1
    @rusasd1 Před 6 měsíci +1

    Super useful and interesting, I started using Ransack thanks to your videos and it's saving me so much time :)

  • @ledockol
    @ledockol Před 6 měsíci +1

    Great, Yaro!
    The material is becoming more and more complex. So it will be more useful!
    In fact, we have already approached the creation of Facets search filters.
    If you want to develop this topic even more, you can automatically request the number of matching items from the server after selecting the filter options. Display this data in a small window with an "Apply" button. Further adding or removing filters will cause the number of items to change dynamically.
    Glory to Ukraine!

    • @SupeRails
      @SupeRails  Před 6 měsíci

      this sounds like a next-step feature! nice