Join Virtual JavaScript Days 2026 and Get a Free Participation Certificate – Register Now!

Top Support Tips

October 9, 2014 2968 Views

Get a summary of this article:

Show

Removing Grid Cell Focus

by Greg Barry

As of Ext JS 5.0.1, we’ve added some significant improvements regarding Accessibility and ARIA support. While we do encourage users to use these new additions, we understand that the default style may not be ideal in all circumstances. In fact, there may be situations in which the focused cell border is not desired at all.

If you would like to make adjustments to the focus style, it’s best to change these properties by modifying your SASS variables and recompiling your styles.

You can find the cell focus SASS variables on the Grid View. They currently include:

While we recommend compiling style changes via the above SASS variables, you can also use the following CSS selector to modify or hide grid cell borders:

.x-grid-item-focused .x-grid-cell-inner:before {
        border: 0;
}

You can see an example of the CSS being overridden in this Fiddle.

For more information about Accessibility changes, please check out the new Accessibility Guide.


Creating Instances on the Prototype is Bad

by Mitchell Simoens

When defining a new class using Ext.define, you should never use Ext.create to create an instance on the prototype like this:
Ext.define(‘MyApp.view.Main’, {
extend : ‘Ext.container.Container’,
xtype : ‘myapp-main’,

requires : [
‘MyApp.plugins.Foo’
],

items : [
Ext.create(‘Ext.Component’, {
html : ‘Hello’
})
],

plugins : [
Ext.create(‘MyApp.plugins.Foo’)
] });

Instead, you should use configuration objects with a class alias:
Ext.define(‘MyApp.view.Main’, {
extend : ‘Ext.container.Container’,
xtype : ‘myapp-main’,

requires : [
‘MyApp.plugins.Foo
],

items : [
{
xtype : ‘component’,
html : ‘Hello’
}
],

plugins : [
{
ptype : ‘myapp-foo’
}
] });

The reason to use config objects is that when the class, MyApp.view.Main in this case, is instantiated, it will create new instances based on the config objects for you. If instances were present on the prototype, like in the first code snippet, the first instance of MyApp.view.Main would likely work just fine but any subsequent instances created would not work as expected and possibly throw errors.

In this Fiddle, you can see an example of why creating instances on the prototype is bad.

Recommended Articles

Building Responsive, Data-Driven Enterprise Applications with JavaScript

In enterprise software, responsiveness is no longer a nice-to-have. Users expect the same application to perform smoothly whether they are working at a desktop with…

What’s New in ReExt 1.2

Modern teams are under constant pressure to ship faster without sacrificing UX quality, maintainability, or enterprise-grade capabilities. That’s easy to say, but much harder to…

BFF Architecture – Optimizing Communication between Node. js and Ext JS

Modern enterprise applications rarely struggle because they lack features. More often, they struggle because the frontend and backend are speaking slightly different languages. Your database…

Case Study: Building a Modern Recruitment Application with Ext JS

Hiring the right talent requires more than collecting resumes. Modern recruitment teams need streamlined workflows, real-time visibility, and reliable tools that support every stage of…

Techniques for Handling Large Data Sets in Ext JS

Enterprise applications often need to display and process thousands – or even millions – of records while maintaining a responsive and intuitive user experience. Whether…

Building an AI-Powered School Grading System with Ext JS

Educational institutions are under increasing pressure to evaluate growing numbers of student assessments while maintaining fairness, consistency, and timely feedback. Although artificial intelligence offers new…

View More
JS Days Popup