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

View file

@ -65,7 +65,11 @@ export default Ember.Component.extend({
const $elem = this.$();
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');
$elem.on("change", e => {