-
17 Jun 2011 12:17 AM #11
Very nice!!! Good work, thank you!!!

-
17 Jun 2011 11:14 PM #12
+1
Grgur Grisogono
Ext JS in Action SE co-author
Exercising awesomeness at Modus Create - Official Sencha Partner
Get in touch for Sencha Touch Training
@ggrgur
-
21 Jun 2011 4:28 AM #13
a small bug:
It should not be active if the field is disabled or readonly.
You can fix it?
thanks
-
23 Jul 2011 7:33 AM #14
-
5 Aug 2011 9:48 AM #15
Nice!
Sencha/Java evangelist
Author of ExtJS 4 First Look and Mastering Ext JS books
English blog: http://loianegroner.com
Portuguese blog: http://loiane.com
Sencha Examples: https://github.com/loiane
-
14 Aug 2011 11:13 PM #16
Yeah, looks like in FF the disabled field is honored and not in IE 8 (didn't test others). And readOnly displays the X as well - at least in FF. Didn't test in IE.
That said, VERY COOL plugin. I had modified a triggerfield to show/hide the X trigger when there is a value in the field and that worked, but lacked the sexy value this plugin adds. You have any sway with the devs for an inclusion of this feature in 4.2?
-
5 Sep 2011 11:28 PM #17
Very good.
Please add a custom event handler to "clean up".
-
30 Sep 2011 1:14 PM #18
Is there a way not to delete data when the field is set as "readOnly"?
-
24 Oct 2011 6:03 AM #19
Thanks for this,
I'm having problems with combos with multiSelect: true, setValue('') causes that the combo value to be [''] that is not true, combo value must be [] (0 items selected).
I've to override click and ESC handlers and change se setValue stuff by reset().
Here is the code
Regards,PHP Code:addEscListener: function() {
if (!this.clearOnEscape) return;
this.textField.inputEl.on('keydown', function(e) {
if (e.getKey() == Ext.EventObject.ESC) {
if (this.textField.isExpanded) return;
Ext.Function.defer(this.textField.reset, 1, this.textField);
e.stopEvent();
}
}, this);
},
handleMouseClickOnClearButton: function(event, htmlElement, object) {
if (!this.isLeftButton(event)) return;
this.textField.reset();
this.textField.focus();
}
Leonardo
-
4 Nov 2011 2:34 AM #20
nice plugin but i've same trouble with combobox.
Because reset is not the same as clear value, I do this :
Code:init : function(textField) { this.textField = textField; this.textField.addEvents('clear'); if (!textField.rendered) { textField.on('afterrender', this.handleAfterRender, this); } else { // probably an existing input element transformed to extjs field this.handleAfterRender(); } }, addEscListener: function() { if (!this.clearOnEscape) return; this.textField.inputEl.on('keydown', function(e) { if (e.getKey() == Ext.EventObject.ESC) { if (this.textField.isExpanded) return; Ext.Function.defer(this.clearValue, 1, this); e.stopEvent(); } }, this); }, handleMouseClickOnClearButton: function(event, htmlElement, object) { if (!this.isLeftButton(event)) return; this.clearValue(); this.textField.focus(); }, clearValue : function() { if (Ext.isFunction(this.textField.clearValue)) { this.textField.clearValue(); } else { this.textField.setValue(''); } this.textField.fireEvent('clear', this.textField); }
Similar Threads
-
[NOREPRO] [OPEN-726] bad clear icon handling when Text field is in a toolbar
By jep in forum Sencha Touch 1.x: BugsReplies: 5Last Post: 29 Aug 2011, 9:43 AM -
Ext.form.Field override : Adding an icon to a form field of any type
By arnold in forum Ext 2.x: User Extensions and PluginsReplies: 2Last Post: 25 Mar 2011, 6:41 AM -
TwinTriggerField clear icon is not aligned with the input field
By asafm in forum Ext 2.x: BugsReplies: 1Last Post: 5 Jul 2010, 4:13 AM -
Feature suggestion: Ext.form.Field.clear
By dyndan in forum Community DiscussionReplies: 2Last Post: 28 Feb 2008, 4:01 AM


Reply With Quote

