Results 1 to 2 of 2

Thread: 6.6 nightly issue, ViewModel.set with preventClimb

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,257

    Default 6.6 nightly issue, ViewModel.set with preventClimb

    A new parameter was introduced on to viewmodel.set(), to allow setting a local value.

    However, it seems whoever added this didn't read the docs for the class:

    To bypass the climbing behaviour and push a value into a particular point in the hierarchy, the {@link #setData} method should be used. Once a local value is set, it will be used as such in the future.
    The correct fix would be:

    Code:
    Ext.define(null, {
       override: 'Ext.app.ViewModel',
       privates: {
           setupStore: function (store, key) {
               // Force data object creation
               this.getData();
               // May have been given a store instance
               store.resolveListenerScope = this.listenerScopeFn;
               this.storeInfo[key] = store;
               this.setData({
                   [key]: store
               });
           }
       }
    });
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  2. #2
    Sencha - Ext JS Dev Team nohuhu's Avatar
    Join Date
    Jun 2011
    Location
    Redwood coast
    Posts
    401

    Default

    Thanks Evan, your help is much appreciated. :)
    Regards,
    Alex.

Similar Threads

  1. Replies: 3
    Last Post: 21 Apr 2015, 3:08 PM
  2. Replies: 2
    Last Post: 7 Feb 2015, 2:15 AM
  3. Replies: 2
    Last Post: 10 Nov 2014, 11:12 AM
  4. Replies: 18
    Last Post: 26 May 2008, 12:47 AM

Posting Permissions

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