Results 1 to 3 of 3

Thread: Store.load - isLoading check

  1. #1
    Sencha Premium User
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    2,425
    Answers
    20

    Default Store.load - isLoading check

    ext-6.0.0.561
    Why the me.loading (me.isLoading()) check is present only in the BufferedStore?

    I think it'd be useful if it were also added in TreeStore and Store.
    Code:
    Ext.define('Ext.data.BufferedStore', {
        extend: 'Ext.data.ProxyStore',
        ...
        load: function(options) {
            var me = this;
            
            if (me.loading) {
                return;
            }
            ...

  2. #2
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,664
    Answers
    512

    Default

    Hmmm, isLoading is defined on ProxyStore. Normal Store inherits from ProxyStore so it should be ok to use on any store. http://docs.sencha.com/extjs/6.0/6.0...thod-isLoading
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid MultiSearch Plugin, Grid MultiSort Plugin, Configuring ViewModel Hierarchy


  3. #3
    Sencha Premium Member
    Join Date
    May 2013
    Posts
    59

    Default

    I have the same problem in 6.0.1

    // simple test case
    Code:
    var store = new Ext.data.BufferStore({
    });
    store.load();
    console.log(store.isLoading()); // -> false
    I think this affects all stores which have asynchronousLoad = true. ProxyStore.loading will be set to true in flushLoad method. If asynchronousLoad is true (eg. BufferedStore) the flushLoad method is called with a timeout.

    Maybe there is a need for a "isLoadingOrLoadWasTriggered" method. For example:
    Code:
    Ext.override(Ext.data.ProxyStore, {
        isLoadingOrLoadWasTriggered: function() {
            return this.isLoading() || !!this.pendingLoadOptions;
        }
    });

Similar Threads

  1. TreeStore isLoading() and load event mismatch.
    By Izhaki in forum Ext: Discussion
    Replies: 2
    Last Post: 7 Jun 2012, 4:18 PM
  2. Replies: 2
    Last Post: 7 Jun 2012, 9:02 AM
  3. [FIXED] store.isLoading gone in PR4?
    By tino7_03 in forum Sencha Touch 2.x: Bugs
    Replies: 6
    Last Post: 6 Jun 2012, 1:17 PM
  4. Replies: 6
    Last Post: 14 Mar 2012, 7:10 PM
  5. Check JsonStore load and Store load for form display
    By vayumahesh in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 9 Sep 2008, 12:07 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •