You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's not a Flowbite bug nor an Inertia bug. I noticed that some users in the community have encountered the same problem as I have.
The issue is with Inertia, which loads the page only once. All the links use , so it doesn't open a new page but instead makes an AJAX call and updates the data on the current page.
When Inertia reloads the page, Flowbite doesn't initialize automatically, so it needs to be called manually.
This code solves the problem, but there's an issue: there are two events, 'success' for regular links using , and 'navigate' for browser actions like going back. So, sometimes it will call initFlowbite() twice. I hope someone can optimize this code.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
It's not a Flowbite bug nor an Inertia bug. I noticed that some users in the community have encountered the same problem as I have.
The issue is with Inertia, which loads the page only once. All the links use , so it doesn't open a new page but instead makes an AJAX call and updates the data on the current page.
When Inertia reloads the page, Flowbite doesn't initialize automatically, so it needs to be called manually.
Here is the relevant code in app.js:
This code solves the problem, but there's an issue: there are two events, 'success' for regular links using , and 'navigate' for browser actions like going back. So, sometimes it will call initFlowbite() twice. I hope someone can optimize this code.
Beta Was this translation helpful? Give feedback.
All reactions