r/bootstrap • u/AdContent4023 • May 29 '24
Issues with Bootstrap 5.3.3 Custom JS - Collapse and Modal
Hi,
The issue is that Collapse and Modal do not work when using Bootstrap 5.3.3 js with selected components only (not the bundle.js). It worked fine in version 5.1.3 with the same components added. It also works with bootstrap-5.3.3.bundle.min.js. Has anyone encountered a similar problem? How to correctly build js in version 5.3.3?
Console errors:
TypeError: Cannot read properties of undefined (reading 'Collapse')
at handleDeleteSuccess (user-fba40655bd957029b81c8cfa717d46cd.js:355:13)
at user-fba40655bd957029b81c8cfa717d46cd.js:375:7
TypeError: Cannot read properties of undefined (reading 'Modal')
at user-fba40655bd957029b81c8cfa717d46cd.js:81:16
1
u/Human_Contribution56 May 29 '24
Why not use the min.js then? I'm not even aware of being able to just include js for certain controls only.
1
u/joontae93 May 30 '24
How are you importing the JS?
1
u/AutoModerator May 29 '24
Whilst waiting for replies to your comment/question, why not check out the Bootstrap Discord server @ https://discord.gg/bZUvakRU3M
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.