Closed mikemikehe closed 5 months ago
You can pass your custom action via data attributes:
<%= polaris_card(sectioned: false) do %>
<%= polaris_resource_list do %>
<%= polaris_resource_item(data: {action: "click->custom-controller#action"}) do %>
<p>Content</p>
<% end %>
<% end %>
<% end %>
Hi friends here. I am exploring this
components/polaris/resource_item_component.rb
and I found that it already has callbacks defined in some stimulus controller callback. see belowhttps://github.com/baoagency/polaris_view_components/blob/main/app/components/polaris/resource_item_component.rb#L90
I am wondering how I can add customized logic for my usage? It seems
polaris-resource-item
is with the gem and apply to all usage of resource_item_component.thanks /