bnrq
bnrq

Reputation: 171

Cannot disable list in Sencha Touch

I have a list in Sencha Touch and I want to disable the list when a button is clicked. I am handling the "tap" event of the button. However, when I run the line of code: me.getWhatScreen().down('list[name=taskList]').disable(); the list does not disable. I know I can hide the list, but I would rather just disable it (blur it). Am I missing anything? I have checked the Sencha docs.

Upvotes: 0

Views: 433

Answers (3)

Harikrishnan
Harikrishnan

Reputation: 9979

Try this. you can also find list id from inspecting elements.

Ext.getCmp('listid').disable();

Upvotes: 0

Viswa
Viswa

Reputation: 3211

As for as what i understood if disable not working,

After clicking button just try setting list disableSelection config as true

 alist.setDisableSelection(true)

This configuration will lock the selection model of list.

Upvotes: 0

Swar
Swar

Reputation: 5503

Better mask the whole list using this:

me.getWhatScreen().down('list[name=taskList]').mask();

It will add a shaded layer over the list. If you want it to be completely transparent, add some css on the mask element. You can remove the mask using unmask() method.

Upvotes: 1

Related Questions