Remove highlighting from extjs combobox after selection - extjs

Whenever an item is selcted from extjs combobox, it gets highlighted as follows
Is there any way to remove this highlighting. I searched in google with no success.
I am using ExtJs 2.3.0

First of all, you really need to consider upgrading your ExtJS version. I haven't seen this behavior by default in the newer versions.
Looking at the docs, in the config phase i don't see anythin which can help you.
The simplest thing you can do is add a select listener where you call the selectText method
comboBox.on('select', function(combo,record,index) {
// set the cursor at the start
//comboBox.selectText(0,0);
var cursorEnd =combo.getValue().length;
comboBox.selectText(cursorEnd,cursorEnd);
});
See working example with jsfiddle. It uses a newer ExtJS for illustrative purposes, however the select event and selectText method are also available in ExtJS 2.3.

Related

sencha modern list item swipe item bug

I'm trying to provide swipe actions in Sencha Modern list in version 7.2.0.
Although the documentation indicates that the text, ui, iconcls and cls are bindable, I'm unable to get it to work.
Further, the text seems to be getting bound without any bind configuration which is even more surprising.
Please see relevant fiddle
Essentially, I would like to make the iconCls and the cls change based on the record's data.
Thanks
There is definitely an issue here. The text does not seem to be handled as a bind. If the text field exists it is used..... so I did a quick override that treats the ui field similarly. if it exists it is using it. You can do the same with the iconCls... etc.
Swipper override fiddle

combo box directive not triggered

We have created a directive to do a validation of the input/ selected item must be exists in the combo box list. However, it's not working anymore after upgraded the package to 0.18.1 and implement the [allowCustom]="true". It was working in the previous version 0.10.x.
The scenario is when user remove the entry from the combobox and enter a value again, the directive is triggered. But if user, append the content in the combobox, the directive is not triggered at all.
Please help. Video attached
Sample Project is Attached.
This seems to be a bug in the #progress/kendo-angular-dropdowns#0.18.x release.
I updated the demo to the latest official (0.21.x) and it seems fixed:
http://screencast.com/t/xyN8q9kR

Is there anything about ext js?

I need a project about it ,thank you.I am using Ext.grid.gridpanel.As in rowclick event, we can handle row click of grid..Is there any event to handle column click of grid?
i want to select a particular column of grid.
You are looking for headerclick. Also for any more questions like this just look through the extjs documentation per your version. Sencha documents it very well.

ExtJS first grid row select and deselect

Is it normal that when I have a grid and I select the first row, then I try to select another row it actually deselects the first row without selecting the new one? It seems like a feature to me 'cause it happens to all my grids even with the simplest settings. Is there a way to remove this option?
Yes, this is the default behavior. You can set the selection mode to multiselect, which allows you to select multiple rows by holding the CTRL or SHIFT keys.
I'm unsure which version of ExtJS you are using, but if it is version 4.2, you can set the mode of the selection model to 'SIMPLE' in order to achieve the behavior you are expecting.
Ext.create('Ext.panel.Grid', {
// other grid configs
selModel: {
mode: 'SIMPLE'
}
}
The docs for the mode config are here: http://docs.sencha.com/extjs/4.2.2/#!/api/Ext.selection.Model-cfg-mode
It seems that this was an error with my version of ExtJS. My coworkers were using 4.2.2 while I was using 4.2.1. When I upgraded to the new version everything got fixed by itself. Weird since this does not seem to have been documented...

ExtJS - beforeedit on a Ext.grid.Panel not in API

This is not a problem, but rather a question that came into my mind. Me along with my friend were trying to disable RowEditing when a user doubleclicks a record/cell in the Ext.panel.Grid ( depending on some criteria ). I was looking into the API and was trying a way out. However, in the meanwhile when I googled one of the answers on Stackoverflow ( yeah here ) suggested to use the below event:
grid.on('beforeedit', function(editor, e) {
if (e.colIdx === 0 && e.record.get('status') == 4)
return false;
});
It worked !!! But when I referred back to ExtJS 4.2.0 API ( that's what we are using ), I didn't find the 'beforeedit' event on Ext.grid.Panel or it's parent Ext.panel.Table. The RowEditing plugin had the beforeedit event, but not the Grid. However, the older version 4.1.0 had the event for Ext.panel.Grid ( http://docs.sencha.com/extjs/4.1.0/#!/api/Ext.grid.Panel-event-beforeedit ), in fact beforeedit on Ext.panel.Grid was introduced since 4.1.0.
So, it's just the question which is bothering me that - Was the event deprecated so soon and still working? Or the API for 4.2.0 missed it? Or what was the reason that an event not defined in the API of the version am using, is still working !!! This will help me understand how the API is all documented and if I should rely on older versions for better documentation or whatever.
The beforeedit event is not in the docs for Grid, because it is not an event on the Grid. It is an event on the Grid Editing Plugin.
The events from the Grid Editing Plugin are mixed-in to the grid at run-time, so if you use the Grid Editing Plugin, then the beforeedit event will appear to be on the Grid.
Not sure why they changed the docs between 4.1 and 4.2, but the difference doesn't really matter as the behaviour is the same.

Resources