Looks like we cannot reproduce this. Please provide another test case to reproduce this issue.
  1. #1
    Touch Premium Member
    Join Date
    Sep 2011
    Posts
    5
    Vote Rating
    0
    sworth42 is on a distinguished road

      0  

    Default Buffered store load callback interface inconsistent with documentation

    Buffered store load callback interface inconsistent with documentation


    The documentation for a store states that the callback for the load function has the following interface:

    callback: function(records, operation, success)[/CODE]

    However if the store is buffered then it is calling the callback function with the following parameters (taken from src/data/store.js:loadToPrefetch()):

    Code:
    options.callback.call(options.scope||me, records, startIdx, endIdx, options);
    Also, the callback function is not called at all in the case where the store does not have any records.

    This seems like a bug. I am converting over 30 stores to be buffered and it would be a maintenance headache to keep track of which stores are buffered and handle them differently. I can workaround the problem by listening for the 'load' event which does not have these inconsistencies.

    Thanks,

    Stephen

  2. #2
    Sencha - Support Team
    Join Date
    Feb 2013
    Location
    California
    Posts
    4,728
    Vote Rating
    88
    Gary Schlosberg is a jewel in the rough Gary Schlosberg is a jewel in the rough Gary Schlosberg is a jewel in the rough Gary Schlosberg is a jewel in the rough

      0  

    Default


    Thanks for the report! I have opened a bug in our bug tracker.

  3. #3
    Sencha Premium Member
    Join Date
    Dec 2012
    Posts
    60
    Vote Rating
    1
    k_cire0426 is on a distinguished road

      0  

    Default Bug on callback not firing when empty records.

    Bug on callback not firing when empty records.


    Is there any workaround for this issue? http://www.sencha.com/forum/showthread.php?272483

  4. #4
    Sencha User mixo's Avatar
    Join Date
    Jul 2011
    Location
    Novosibirsk
    Posts
    52
    Vote Rating
    4
    mixo is on a distinguished road

      0  

    Default


    extjs5 seems has the same behavior

  5. #5
    Sencha - Support Team
    Join Date
    Feb 2013
    Location
    California
    Posts
    4,728
    Vote Rating
    88
    Gary Schlosberg is a jewel in the rough Gary Schlosberg is a jewel in the rough Gary Schlosberg is a jewel in the rough Gary Schlosberg is a jewel in the rough

      0  

    Default


    This was fixed in 4.2.2.

    mixo, do you have a test case which reproduces the issue in 5.x?


    Are you a Sencha products veteran who has wondered what it might be like to work at Sencha? If so, please reach out to our recruiting manager:
    sheryl@sencha.com