Comments (16)
1.13.1 is not working on the first click after web page loads in bootstrap 4.1.1, what could be the issue?
from bootstrap-select-temp.
The bower description bug will be fixed in v1.13.1. Working on recreating the second bug. Are you getting that in any other browsers, or just Safari?
from bootstrap-select-temp.
Yeah the same for Firefox 59.0.2 (TypeError: t.fn.dropdown.Constructor is undefined) + Chrome 65 (Uncaught TypeError: Cannot read property 'VERSION' of undefined)
If it helps, I could try code changes, if you have any suggestions.
from bootstrap-select-temp.
Are you sure you're loading Bootstrap before bootstrap-select?
from bootstrap-select-temp.
Maybe helpful, Ive tried something:
Old:
version.full = ($.fn.dropdown.Constructor.VERSION || '').split(' ')[0].split('.');
New:
version.full = ('1.13.0' || '').split(' ')[0].split('.');
And its working without any errors. Maybe it is possible to rewrite just the $.fn.dropdown.Constructor.VERSION in another way?
And yes, i'am loading it as last library.
from bootstrap-select-temp.
That line of code retrieves the Bootstrap version. If Constructor is returning undefined, it has to be an issue with the way Bootstrap is being implemented. Could you link me to a demo?
from bootstrap-select-temp.
I ran into this issue while using bootstrap-select in a React environment (no delivered Bootstrap code). We've been using bootstrap-select without issue that way until v1.13.0. I've pinned it to never go beyond 1.12.4 to resolve the issue.
I recognize that bootstrap-select has Bootstrap right in its name, but up to this point I'm unaware of dependencies between bootstrap-select and Bootstrap's JS. I've not run into any, at least.
from bootstrap-select-temp.
Bootstrap-select depends on Bootstrap's dropdown.js, as well as some other necessary CSS. I'm planning on releasing a bundled version in the near future that would include only the necessary Bootstrap code to prevent having to load Bootstrap separately (to prevent extra bloat if you're not already using Bootstrap in your project).
I would love to get this particular issue figured out, but I need to find a way to recreate it so I can get to the bottom of it.
from bootstrap-select-temp.
Iam more than happy to let you know that I could fix the bug!
Like I said, 1.12.4 worked without an issue before and iam using the dropdown plugin v.3.3.7 which is inside the bootstrap.js file.
To fix the newly introduced 1.13.0 TypeError Bug I had to change the order in which the scripts are embedded inside the vendor.json.
Before (With Error):
"bower_components/bootstrap/dist/js/bootstrap.min.js",
"bower_components/bootstrap/dist/css/bootstrap.min.css",
...
"bower_components/dropdown.js/jquery.dropdown.js",
...
"bower_components/bootstrap-select/dist/js/bootstrap-select.js",
After (Wich fixes the error):
"bower_components/bootstrap/dist/js/bootstrap.min.js",
"bower_components/bootstrap/dist/css/bootstrap.min.css",
...
"bower_components/bootstrap-select/dist/js/bootstrap-select.js",
"bower_components/dropdown.js/jquery.dropdown.js",
...
So its crucual that the Bootstrap-Select.js library will be loaded BEFORE the jquery.dropdown.js library is loaded.
from bootstrap-select-temp.
UPDATE
I think this part of jquery.dropdown.js interferes with Bootstrap-Select Plugin:
$.fn.dropdown = function(params) {
if( typeof methods[params] == 'function' ) methodsparams;
if (methods[params]) {
return methods[params].apply(this, Array.prototype.slice.call(arguments,1));
} else if (typeof params === "object" | !params) {
return methods.init.apply(this, arguments);
} else {
$.error("Method " + params + " does not exists on jQuery.dropdown");
}
};
And after visiting the Github Repo i found that this is a bug of the jQuery.dropdown.js Plugin:
FezVrasta/dropdown.js#19
from bootstrap-select-temp.
Ah, I see. I haven't heard of the dropdown plugin before. It was definitely interfering with Bootstrap's own dropdown.js. Is there a reason you're including both?
from bootstrap-select-temp.
In the end I removed the dropdownjs library from my project.
I appreciate your fast help, thanks @caseyjhol!
from bootstrap-select-temp.
I'll go ahead and make a change in v1.13.1, so that if there are any issues detecting the version it will fall back to 3.
from bootstrap-select-temp.
Fixed and released in v1.13.1!
from bootstrap-select-temp.
I ran into this issue as well and 1.13.1 fixed it, but I still get the ugly console.error. Maybe it's better as a console.info until the issue is completely understood and fixed? I'm loading jQuery before Bootstrap so that bootstrap tooltip overrides jQuery's. Then, bootstrap-select is loaded after those. I have these set up as dependencies in a requirejs config...
from bootstrap-select-temp.
@caseyjhol Still getting this error (Click Here)
In my packages.json
"devDependencies": {
"axios": "^0.18",
"bootstrap": "^4.1.2",
"browser-sync": "^2.24.4",
"browser-sync-webpack-plugin": "2.0.1",
"cross-env": "^5.1",
"jquery": "^3.2",
"laravel-mix": "^2.0",
"lodash": "^4.17.4",
"popper.js": "^1.12",
"vue": "^2.5.7"
},
"dependencies": {
"bootstrap-select": "^1.13.1",
"chart.js": "^2.7.2",
"datatables.net": "^1.10.16",
"datatables.net-bs4": "^1.10.16",
"font-awesome": "^4.7.0",
"gijgo": "^1.9.6"
}
I went inside the bootstrap-select.js and it still has the old code (Check Here)
Why can't I find this commit in 1.13.1? When are you planning to merge this?
from bootstrap-select-temp.
Related Issues (20)
- Custom class names or class prefix HOT 1
- Bug: Characters like & are escaped to & amp; when used in titels HOT 1
- [Release] Material design theme HOT 1
- Knockout binding support HOT 1
- LiveSearch and "Select All" selects too many options HOT 1
- data-width="auto" seems incorrect in the new version HOT 1
- How bootstrap-select to internationalized? HOT 1
- data-max-options="1" error HOT 2
- liveSearchNormalize not searching for accents HOT 1
- data- attribute not working HOT 1
- No value on output
- Arrow down key doesn't scroll the view to the top when data-size is set HOT 1
- Feature: Add custom button to action box HOT 1
- Is this plugin currently working? HOT 2
- Select options(selected class is not removed properly) is not updating properly when choosing options at the bottom of the select HOT 1
- Error when clicking on the selectpicker HOT 2
- Long Option text not adding horizontal scrollbar HOT 2
- Document how to add select options programmatically HOT 1
- Dropdown-menu can't place properly HOT 1
- How to get all selected elements? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bootstrap-select-temp.