themesberg / themesberg/flowbite
Dropdown and modal not showing after navigate
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 9.4k
- Forks
- 862
- PR merge metrics
- No merged PRs in 30d
Description
I'm having an issue with the dropdown and modal components in Flowbite. Every time I navigate, these two components stop working. I'm using Laravel 11, Inertia v2, and React.
import "@/css/app.css";
import { createInertiaApp, router } from "@inertiajs/react";
import { createRoot } from "react-dom/client";
import Main from "@/js/Layout/Main";
import { initFlowbite } from "@/node_modules/flowbite";
createInertiaApp({
resolve: (name) => {
const pages = import.meta.glob("./Pages/**/*.jsx", { eager: true });
let page = pages[./Pages/${name}.jsx];
if (!page) {
throw new Error(`Page not found: ./Pages/${name}.jsx`);
}
page.default.layout =
page.default.layout || ((page) => <Main children={page} />);
return page;
},
setup({ el, App, props }) {
createRoot(el).render(<App {...props} />);
},
title: (title) => (title ? `${title} - CHMS` : "CHMS"),
progress: {
color: "#ea580c",
showSpinner: true,
},
}).then((result) => {
initFlowbite();
});
router.on("navigate", (event) => {
initFlowbite();
});
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Inertia app setup containing createInertiaApp, createRoot, initFlowbite, and router.on("navigate"). Reproduce navigation with the dropdown and modal, then trace whether Flowbite initialization runs after the React page changes. Done means both components continue working after navigation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, laravel, react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100