Tabs with Stimulus
Hi Chris - I've been following your guide on adding tabs with Stimulus here: https://github.com/excid3/tailwindcss-stimulus-components
I am not using Tailwind but everything is working. However, when I add a block inside tab 1 nothing is rendered? The h2 content is rendered though.
There are no errors, so I am scratching my head.
example:
<div class="hidden dbroot__content--1" data-target="tabs.panel">
<h2>This is tab 1</h2>
<div class="whatever">
<% @pages.each do |page| %>
<%= page.title %>
<%= page.slug %>
<%= link_to 'Show', page %>
<%= link_to 'Edit', edit_dashboard_page_path(page) %>
<%= link_to 'Destroy', page, method: :delete, data: { confirm: 'Are you sure?' } %>
</tr>
<% end %>
</div>
Hey Brian!
Looks like you've got some invalid HTML there. There's a closing tablerow tr tag, but no opening one and you're missing a closing div for the tabs.panel div?
Thanks for the quick response, Chris. I switched computers and forgot that I didn't have any pages created on my desktop database. Embarrassing mistake lol.
Haha! I don't want to admit, but I do that pretty regularly too switching between my laptop and desktop. 😅