Magic Responsive Tables with Stimulus and IntersectionObserver
14-Jan-2021 1256
You’re working on this data table for your app. It’s mostly server-side HTML. Nothing fancy.But as you’re adding columns, you’ve got a problem. How are you going to handle small screens?The table has to scroll horizontally to let the user see all the columns. The table needs to become “responsive”.In this article, we’ll look at a side-scrolling widget used in Shopify’s Polaris UI toolkit (currently built in React), and we’ll recreate the functionality using just Stimulus without having to rewrite your data table in React.
Magic Responsive Tables with Stimulus and IntersectionObserver #ruby #rubydeveloper #rubyonrails #Magic #Responsive #Tables #Stimulus #IntersectionObserver #stimulus https://www.rubyonrails.ba/link/magic-responsive-tables-with-stimulus-and-intersectionobserver