JS Days 2025 Replays are now live! Watch all sessions on-demand Watch Now

Top Support Tips

March 30, 2015 1622 Views
Show

Top Support Tips

Everlasting Scrollbars

by Kevin Cassidy

Have you ever wished you could always display your Touch container’s scrollbars instead of them automatically appearing and disappearing? Now you can. With this simple override, you can make use of Ext.scroll.View’s private indicatorsHidingDelay property. This override causes the container scroll bars to be visible whenever the indicatorsHidingDelay property is set to a negative value. If you want to return to the default behavior, you can call the setIndicatorsHidingDelay method with a positive value.

You can see the everlasting scrollbar in action here:
https://fiddle.sencha.com/#fiddle/fuo

Note: This is a great tip but be cautious about using private configurations, methods and events. They may change at any point and their use is not supported if other issues occur.


on Destroyable

by Seth Lemmons and Greg Barry

Developers can easily add event listeners to Components and Elements by utilizing Ext.mixin.Observable’s on() method (shortcut for addListener()). That said, you may need to remove those listeners while maintaining the Component or Element to which they were attached. You canuse un() (shortcut for removeListener()) by passing it the same config and scope used with on(). However, there is a shortcut offered by on() that may be better suited to your needs — destroyable: true.

By default, the destroyable option is false. When set to false, on() will return the Component or Element to which the handlers were attached (Ext JS 4.x returns undefined). However, with destroyable: true, an object is returned with a destroy() method. When called, it will destroy the previously set event handlers while preserving your Component or Element.

You can see the destroyable config in action here:
https://fiddle.sencha.com/#fiddle/f8i

Recommended Articles

Why Rapid Ext JS Is Ideal for Developers Who Need Speed, Scalability, and Rapid Application Development

Rapid Ext JS, which is an Extended JavaScript framework, speeds up app development using low-code tools. It makes building apps that can grow with your…

Guide to Estimating ROI When Switching From DIY Libraries to Full Software Development Platforms Like Ext JS

Teams started with Do It Yourself, or DIY, JavaScript tools like jQuery and Bootstrap. But those fall apart as projects scale. Scattered code, user interface…

Top Frameworks Developers Are Using for Custom Software Development in 2025

We’re seeing it more every year; teams aren’t settling for plug-and-play tools anymore. In healthcare, finance, logistics, and other data-heavy industries, there’s a clear shift.…

Meet Sencha AI Coding Companion: Your AI-Powered Assistant for Faster Ext JS Development

Building modern web applications should be exciting. But too often, developers find themselves buried in documentation, endlessly Googling framework quirks, or stuck solving the same…

Ext JS 7.9 & Rapid Ext JS V1.1 Have Arrived

The Sencha team is excited to announce the latest Ext JS version 7.9 and Rapid Ext JS 1.1 release – designed to accelerate development, enhance…

Top 10 JS Grid Customization Tips for a Better UI Experience

Grids are pretty much everywhere in web apps. Working with financial sheets, product details, or users? Then you’ve probably used a JavaScript grid. It makes…

View More

Trusted by Top Developers: Learn how to enhance your development journey — for free

Get the latest newsletter keeping thousands of developers in the loop.

Loved by developers at
JSDays Replay