Releases: harvesthq/chosen
Officially Going to 1.0
Just over 2 years after Harvest announced Chosen, we decided to pull the trigger on a 1.0 release. This is long overdue as Chosen has been used in production sites for all of the two years it's existed, but ... here we are.
Notable Changes for 1.0
- All CSS class names have been renamed from a
chzn-
root to achosen-
root. - All custom Chosen events starting with
liszt
are now prefaced with achosen:
See #1412 for more details.
I have to admit it's getting better (better)
Optionally hide selected & disabled options
By default, Chosen shows disabled & selected options with a greyed-out style. For some use cases, this can create unwanted noise. Now, you can pass display_selected_options: false
and/or display_disabled_options: false
when applying Chosen to have those options excluded from search results.
See #1404 for more.
Un-Chosen
Sometimes, you need to remove Chosen from the page. Chosen now provides an interface for doing that which cleans up the created HTML and event listeners and returns the original select to its place on the page.
// jQuery version
$('#chzn-select').chosen();
$('#chzn-select').chosen('destroy');
// Prototype version
var chosen = new Chosen('#chzn-select');
chosen.destroy();
See #1396 for more.
Chosen disabled by default on iPhone/iPod/Android mobile device
On small screen devices, Chosen is not an improvement over the native select controls. While search is available, the keyboard covers up a large chunk of the search results and finding your desired selection can be difficult. For these devices, Chosen simply leaves the original select field alone.
See #1388 for more.
Single backspace clears choices
Previously, it took two presses of backspace to remove choices from multiple selects. This is still an option for the time being, but the default has been switched to requiring one press.
See #1375 for more.
Misc Bug Fixes, Improvements and Code Changes
- CSS Updates #1368, #1371
- Prevent text selection on Chosen #1374
- No longer expose classes to window context #1389
- Single select value fix #1392
- Remove javascript:void and attr references #1385, #1377
- Always clear result highlight #1407
- Replace characters only once #1411
Misc Project Maintenance Changes
Optgroup Search and Other Improvements
Search Optgroups
Chosen now searches the text of option groups by default (though an option exists to disable this functionality). When an optgroup matches, all results in that group are shown in the search results. #1343
Misc Bug Fixes and Improvements
Use SASS for CSS generation.
- Generate CSS from SASS #1320
SO. MUCH. SPEEDIER.
Speed Chosen up significantly (#1339)
Chosen's overall performance has been improved. This is most noticeable when using Chosen on selects containing hundreds or thousands of items. The pull request goes into greater detail about the changes and how much of a performance impact you can expect.
Misc Project Maintenance Changes
Removing Generated Files From Repository
This release removes all generated JS and CSS from Chosen's git repository. A bundled zip file will now be made available using Grunt.
This change will help reenforce Chosen's code conventions for a PR:
- Make all changes in CoffeeScript files, not JavaScript files.
- Use Grunt to build the JavaScript files.
Lots of Bug Fixes
This release contains a heap-load of bug fixes.
- Replace prop for jQuery legacy support #1311
- Prevent default on arrow down #1309
- Explicitly add files for gh-pages #1307
- Fix RTL Disabled Search Issue #1300
- Fix scroll bug in Prototype version #1301
- Read-only search field when search is disabled. #1294
- Remove Grunt-Bump #1280
- Make sure Chosen isn't disabled before showing results. #1282
- Fix choice build after update #1286
Show Disabled Options
Feature Changes
- Show disabled options (#1262): all options that match a given search are now displayed (previous versions hid selected or disabled options). Selected and disabled options will be displayed with a light gray style to differentiate them from other, selectable options.
Bug Fixes
Fixes, Refactoring and Guidelines
Contributing Guidelines #1236