partkeepr

fork of partkeepr
git clone https://git.e1e0.net/partkeepr.git
Log | Files | Refs | Submodules | README | LICENSE

Ext.form.field.ComboBox-associationSupport.js (575B)


      1 /**
      2  * Overrides the ExtJS Combobox with a configuration option to return the selected object and not their ID value
      3  */
      4 Ext.define('Ext.form.field.ComboBox', {
      5     override: 'Ext.form.field.ComboBox',
      6 
      7     config: {
      8         returnObject: false
      9     },
     10     getValue: function () {
     11         if (this.getReturnObject() === true) {
     12             if (this.callParent(arguments) === "" && this.allowBlank === true) {
     13                 return null;
     14             }
     15             return this.getSelection();
     16         } else {
     17             return this.callParent(arguments);
     18         }
     19     }
     20 });