Results 1 to 2 of 2

Thread: How to properly reload a treepanel in Extjs 6.6

  1. #1
    Sencha Premium User
    Join Date
    Jul 2017
    Posts
    3

    Question How to properly reload a treepanel in Extjs 6.6

    Hi,
    I'm playing around with the treegrid and I'm experiencing a "random" bug when I reload it now and then.

    I have this treePanel showing some datas which is working just fine all the time on first load.

    But I want to fully update it by re-loading datas from the server.

    To do so I'm doing treePanel.getStore().load();

    Most of the time it works just great but maybe 1 time out of 30 I get "Uncaught TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at ctor.commit [...]

    And this happen right after the server response, with a valid JSON identical to the one I use at first load and wich works almost everytime.

    As I don't see what I'm doing wrong and saw below the TreeStore load method https://docs.sencha.com/extjs/6.6.0/...ml#method-load
    Be aware that it is not usually valid for a developer to call this method on a TreeStore.

    Therefore I am wondering, what is the proper way to fully reload a TreeStore ?

    Thank you for your help !

  2. #2
    Sencha Premium User
    Join Date
    Jul 2017
    Posts
    3

    Default

    I may have found a solution.

    https://docs.sencha.com/extjs/6.6.0/...#method-reload

    I apparently never saw it before.
    So far it's working.

Tags for this Thread

Posting Permissions

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