| 1234567891011121314151617181920212223242526272829303132333435363738 |
- Ext.define("school.override.form.field.ComboBox", {
- override: "Ext.form.field.ComboBox",
-
- clearable: false,
- config: {
- triggers: {
- clear: {
- weight: -1,
- cls: 'fa-times',
- hidden: true,
- onFieldFocus: function() {
- if(this.field.clearable) {
- this.setHidden(false);
- }
- },
- onFieldBlur: function() {
- if(this.field.clearable) {
- this.setHidden(true);
- }
- },
- handler: function() {
- if(this.clearable) {
- this.setValue(null)
- this.triggers.clear.setHidden(true)
- this.fireEvent('clear', this);
- }
- }
- },
- picker: {
- handler: 'onTriggerClick',
- scope: 'this',
- focusOnMousedown: true
- }
- }
- },
- });
|