Closed RobinBoers closed 11 months ago
This PR adds the event flag to the pagination component. If enabled, the link_type and path options will be overwritten, and clicking the buttons in the component will send events to the parent LiveView. Here's an example:
event
link_type
path
<.pagination event={true} current_page={@page} total_pages={@total_pages} />
@impl true def handle_event("goto-page", %{"page" => page}, socket) do {:noreply, push_patch(socket, to: ~p"/posts/#{page}")} end
This PR is a replacement for #240
Released in 1.4.2!
This PR adds the
event
flag to the pagination component. If enabled, thelink_type
andpath
options will be overwritten, and clicking the buttons in the component will send events to the parent LiveView. Here's an example:This PR is a replacement for #240