7

The Sencha store is automatically adding a ajax loader mask when populating the store, but I want to hide it since I have made a more generic mask which is shown every time the app does a ajax request.

How can I hide the store load mask? Tried to look in the documentation, but didnt find any appropriate field/method there:

See attachement:

enter image description here

Thomas Vervik
  • 4,325
  • 9
  • 36
  • 64

3 Answers3

17

The property exists: loadingText, which you have set to null.

{
    xtype: 'list',
    store: 'Store',
    loadingText: null, // for ST 2.3.0 set it to false
    ....
}

Cheers, Oleg

Umair A.
  • 6,690
  • 20
  • 83
  • 130
olegtaranenko
  • 3,722
  • 3
  • 26
  • 33
0

Olegtaranenko: Your solution does remove the loadmask, but setting the loadingText to 'null' also seems to break the "PullToRefresh" plugin functionality for a list.

By 'break', I mean that after pulling the arrow down to refresh, the ui remains in this state, and does not hide the PullToRefresh section at the top.

Is there a way to hide the additional loadmask, while retaining the ability to pull to refresh?

For anyone that is reading this in future and is trying to achieve what I have described above, I worked around the issue with PullToRefresh by changing the original Sencha touch 1.1.1 code (line 45346 of sencha-touch-debug-with-comments.js). This is not ideal, but provides a quick workaround.

Original (PullToRefresh breaks)

onBeforeLoad: function() {
        if (this.isLoading && this.list.store.getCount() > 0) {
            this.list.loadMask.disable();
            return false;
        }
    },

Workaround

onBeforeLoad: function() {
        if (this.isLoading && this.list.store.getCount() > 0) {
            try{ this.list.loadMask.disable(); }
            catch(err) {  }
            return false;
        }
    },
Paul
  • 529
  • 1
  • 6
  • 20
  • hmm... it does not break the PullRefresh plugin, at least in ST 2.0. I'm using this trick (with pull refresh) elsewhere and never noticed any problem. May be ST 1.1 has quirks, dunno – olegtaranenko Sep 15 '12 at 11:17
0

Just add on your View

viewConfig: {
    loadMask: false
}
Salma EL HAJRAOUI
  • 166
  • 1
  • 1
  • 9