Releases: snapappointments/bootstrap-select
v1.14.0-beta3
Bug fixes
- [#2634] Remove IE hacks in CSS
- [#2669] Remove deprecated sass division with slash character
- [#2627] Remove "mobile-device" class on destroy
- [#2616] Fix line ending in Latvian file
- [#2600] Fix optgroup
- [#2367] Support selectedTextFormat of count > 0
- [#2585] Fixes two
TypeError
exceptions when up/down arrow pressed - Fix
Cannot read property 'position' of undefined
error - Fix
Cannot read property 'index' of undefined
error - Fix several overflow bugs
- [#2659] [#2671] Fix broken Ajax search
- [#2593] Fix maxOptions bugs
i18n
New features
- [#2305] Add new CDN: PageCDN
- Support passing in a boolean
more
argument as an additional argument to thesource.data
/source.search
callback functions
New Contributors
- @rjregenold made their first contribution in #2585
- @praisedpk made their first contribution in #2305
- @mehmetemrekutluca made their first contribution in #2621
- @NicolasCARPi made their first contribution in #2616
- @diat01 made their first contribution in #2625
- @senchden made their first contribution in #2669
- @megumiimai made their first contribution in #2713
Full Changelog: v1.14.0-beta2...v1.14.0-beta3
v1.14.0-beta2
v1.14.0-beta
To install: npm install bootstrap-select@next
.
The highlight of this release is support for using Ajax/JSON as the data source. This includes a new source
option, which supports 3 properties: data
, load
, and search
. All 3 support a function that passes an array of options to the callback argument. Alternatively, an array can be set (probably more useful for data
). If source.load
is set, it will be called when reaching the bottom of the dropdown menu. If source.search
is set, bootstrap-select's internal search functionality will be bypassed, allowing you to perform the search yourself. If performing a search and source.search
is set, it will be called again when reaching the bottom of the dropdown menu.
Example usage:
$('#test2').selectpicker({
source: {
data: function (callback) {
var array = [
{
text: 'Tent',
icon: 'fa-camera'
},
{
text: 'Flashlight',
selected: true
},
{
text: 'Disabled Option',
disabled: true
},
{
value: 'divider',
divider: true
},
{
text: 'Toilet Paper'
}
];
callback(array);
},
load: function (callback, page) {
$.ajax('/api/load-more', { data: { page } })
.then((response) => callback(response.data))
},
search: function (callback, page, searchTerm) {
$.ajax('/api/search', { data: { page, search: searchTerm } })
.then((response) => callback(response.data))
}
}
});
New Features
- #899: Ajax/JSON data source support
- #1315: Reset select element when
form.reset()
is called - #1416, #2147: Using
title
to set the select's placeholder has been deprecated. Useplaceholder
instead.title
will no longer set the placeholder starting in v2.0.0.title
andplaceholder
can still be used together to support a placeholder and a custom title. - #1449: Add
allowClear
option to support deselecting the value for single selects - #1893: Add
open
andclose
methods - #2042: Support assigning a function to
liveSearchStyle
for custom filtering
Bug Fixes
- #2507: Placeholder doesn't work when the first option is disabled
Breaking Changes
v1.13.18
Bug Fixes
- #1342: Bootstrap select doesn't send field data on form submit (set form attribute on select element to fix)
- #2402: In Internet Explorer, with liveSearchPlaceholder enabled, can't select option while searchBox is focused. Also, selected option doesn't get scrolled to when opening menu
- #2464: title attribute does not work in 1.13.17 (Safari)
- #2469: Shift-Tab key not working in 1.13.17
- #2474: With multiple selects, cannot select options with keyboard after using mouse to select options
- #2483: Dropdown with unselectable index 0 will not scroll to top on arrow_down with last index selected
- #2491: remove placeholder/title option when destroying selectpicker
v1.13.17
v1.13.16
Bug Fixes
- #2380: Specifying a Title and OptGroups creates a redundant divider
- #2381: Tick/check mark rendering in Firefox
- #2391: setStyle fails if newElement.parentNode is a document fragment
- #2393: liHeight does not consider custom option content when computing li height
- #2442: Using a class in optgroup results in an error on refresh in chrome
- #2445: Problem with refresh and selected item
- #2446: Bootstrap select property '_dataApiKeydownHandler' error
v1.13.15
v1.13.14
Bug Fixes
- #2436: TypeError: Cannot read property 'content' of undefined
- #2437: If a select has the title attribute set (and is not a multiple select), selecting an option doesn't update the value in the button
Translations
v1.13.13
Bug Fixes
- #2339: data-size="false" not working
- #2337: calling deselectAll/selectAll immediately after page load throws error
- #2320: Dropup becomes a dropdown upon search
- #2308: Keyboard control over Bootstrap Dropdown components stops working
- #2272: Class bs-placeholder is no longer set on "default" values in 1.13.10
- #2352: "Deselect All" doesn't consistently work with virtual scroll
v1.13.12
Bug Fixes
- #2176: allow was-validated class to work on select elements without selectpicker class
- #2321: CTRL + F5 not working while dropdown is open
- #2308: Keyboard control over Bootstrap Dropdown components stops working
- #2275: Bug: Event duplication on refresh
- #2273: "precompiled bootstrap" link is broken in README
Improvements
- #2243: change liveSearch input type from "text" to "search"