Allow options to be cleared.

This commit is contained in:
Guo Xiang Tan 2016-05-27 14:34:44 +08:00
parent efc45aa704
commit eb21ed7fcf
No known key found for this signature in database
GPG Key ID: 19C321C8952B0F72
1 changed files with 5 additions and 1 deletions

View File

@ -65,7 +65,11 @@ export default Ember.Component.extend({
const $elem = this.$(); const $elem = this.$();
const minimumResultsForSearch = this.capabilities.isIOS ? -1 : 5; const minimumResultsForSearch = this.capabilities.isIOS ? -1 : 5;
$elem.select2({formatResult: this.comboTemplate, minimumResultsForSearch, width: 'resolve'}); $elem.select2({
formatResult: this.comboTemplate, minimumResultsForSearch,
width: 'resolve',
allowClear: true
});
const castInteger = this.get('castInteger'); const castInteger = this.get('castInteger');
$elem.on("change", e => { $elem.on("change", e => {