twbs / bootstrap

The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.

Home Page:https://getbootstrap.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can a react web app have both a Modal Component, and Off-canvas nav menu. When I use both strip and Import. the drop-down toggle in Off-canvas nav does not respond

PixelJunkie33 opened this issue · comments

Prerequisites

Describe the issue

A developer can not use the strip import for Modal Component and Import Bootstrap.bundle.min.js files in the same app. The functionality for the Off-canvas dropdown nav menu needs the import.

To render a Modal component the developer must in <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.0/js/bootstrap.bundle.min.js"></script> into the HTML file.

when using the Off-canvas nav, I insert import "bootstrap/dist/js/bootstrap.bundle.min.js at the top of the file. This import govens many things including this button:

  <button
            type="button"
            className="btn-close text-reset"
            data-bs-dismiss="offcanvas"
            aria-label="Close"
          ></button>

Are there any solutions?

Reduced test cases

N/a

What operating system(s) are you seeing the problem on?

Windows

What browser(s) are you seeing the problem on?

Microsoft Edge

What version of Bootstrap are you using?

5.3.0

Same Name issue use different names

Please check if there are same function or ids or anything same because two files if they have same some function name or something same in their data they might give unwanted errors try changing the name of the id or class of your elements and try again.

Hello @PixelJunkie33. Bug reports must include a live demo of the issue. Per our contributing guidelines, please create a reduced test case on CodePen or StackBlitz and report back with your link, Bootstrap version, and specific browser and Operating System details.

As the issue was labeled with awaiting-reply, but there has been no response in 14 days, this issue will be closed. If you have any questions, you can comment/reply.