SteveSanderson / knockout-es5

Knockout.js meets ECMAScript 5 properties
158 stars 39 forks source link

Add array support for deep track #37

Open archangel-irk opened 9 years ago

archangel-irk commented 9 years ago

see https://github.com/archangel-irk/storage/blob/master/lib/document.js#L1091

    var obj = {
        selected: {},
        locale_days: {
            mon: 'Понедельник',
            tue: 'Вторник',
            wed: 'Среда',
            thu: 'Четверг',
            fri: 'Пятница',
            sat: 'Суббота',
            sun: 'Воскресенье'
        },
        pages: [
            { identity: 'general', title: 'О заведении', isActive: false },
            { identity: 'photos', title: 'Фото и фотоотчеты', isActive: false },
            { identity: 'reviews', title: 'Отзывы', isActive: false },
            { identity: 'offers', title: 'Акции', isActive: false },
            { identity: 'menu', title: 'Меню', isActive: false },
            { identity: 'feeds', title: 'Бизнес-ланч', isActive: false },
            { identity: 'banquet', title: 'Банкеты', isActive: false }
        ],
        activePage: 'general'
    };

    ko.track(obj, {
        deep: true
    });

  console.log(ko.getObservable(obj.pages[0], 'isActive')); // null
grofit commented 8 years ago

Is this on the roadmap anywhere? as this is a major problem for one of my current projects :(

archangel-irk commented 8 years ago

I will try to do it in the next couple of days, thanks.

grofit commented 8 years ago

brilliant, this is also linked to #51

jvissers commented 8 years ago

@archangel-irk ~ was wondering whether there might be any new developments for this specific issue?