Releases: leocaseiro/angular-chosen
Disable Chosen for Mobile devices
The directive shouldn't be available for mobile devices. Chosen by itself doesn't work.
You can read more about it at Chosen Oficial repo.
If you are interested in enabling an autocomplete for your mobile devices (big list), I recommend trying another library, such as Typeahead
Bump to 1.4.1
Make sure files on dist
are up to date.
Fix ng-if issues
Add option to create/add new item or just listen type-text
I've added v.1.3.0 compatibility with the Forked Chosen from @koenpunt, so we're able to add/create new item.
First step is switch from oficial chosen.js
and chosen.css
to koenpunt/chosen versions.
You can download it here: https://github.com/koenpunt/chosen/releases
Then, you'll have 4 new attributes: create-option-text
, persistent-create-option
, skip-no-results
and create-option
To Create new option, use like that:
$scope.name = 'Multiple Angular Chosen Example add new option';
$scope.state = ['California', 'Arizona'];
$scope.states = [
'Alaska',
'Arizona',
'Arkansas',
'California'
];
$scope.createOption = function(term) {
$scope.$apply(function() {
$scope.states.push(term);
$scope.state.push(term);
});
}
<select multiple
chosen
create-option-text="'Create item'"
persistent-create-option="true"
skip-no-results="true"
create-option="createOption"
ng-model="state"
ng-options="s for s in states">
<option value=""></option>
</select>
Here is an example working http://plnkr.co/edit/xZ5XbO?p=preview
Release 1.2.1
Release 1.2.0 with ./dist/angular-chosen.min.js
WARNING: Since the version 1.2.0 the file ./chosen.js is deprecated and you must include ./dist/angular-chosen.js or ./dist/angular-chosen.min.js instead
Fix ng-disabled before startLoading, add attr allow-empty-results-list, more...
Fix Compatibility with AngularJS 1.4.9+
Thank you @akotlar for the quick fix.
Now triggers post-pageload
Now triggers post-pageload, merge request from @gaui
Link to chosen thingy
Merge pull request #43 from kbdaitch/master Use compiled JS zip for chosen