-
Notifications
You must be signed in to change notification settings - Fork 834
Open
Description
Problem
Flowbite components stop working after form validation errors in Rails. They work on initial page load but become unresponsive after Turbo re-renders the page with a 422 response.
Root Cause
/src/index.turbo.ts currently listens to:
turbo:loadturbo:frame-loadturbo:after-stream-render
But it's missing turbo:render, which fires when Turbo replaces the entire page (like after form validation
errors). Without this listener, initFlowbite() never gets called and components remain dead.
Fix
Add this
const turboRenderEvents = new Events('turbo:render', [initFlowbite]);
turboRenderEvents.init();
Metadata
Metadata
Assignees
Labels
No labels