Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ns.ViewCollection которая зависит от модели коллекции и ещё от какой-то невалидной модели - boom #654

Open
chestozo opened this issue Aug 30, 2017 · 3 comments
Labels

Comments

@chestozo
Copy link
Member

chestozo commented Aug 30, 2017

Есть модель коллекция типа такой:

ns.ViewCollection.define('mega-view-collection', {
    models: {
        'model-collection': false,
        'model-that-can-be-invalid': false
    },
    split: {
        byModel: 'model-collection',
        intoViews: 'collection-item-view'
    }
});

Шаги:

  • первая отрисовка
    • валидная непустая model-collection
    • невалидная model-that-can-be-invalid
    • получаем отрисованную error моду для коллекции
  • вторая отрисовка через вызов view.update() у mega-view-collection
    • получаем ошибку типа Error: [ns.View] Can't find node for 'collection-item-view'

Тут либо править проверку внутри ns.ViewCollection, либо не давать ей зависеть от других моделей - т.е. чтобы коллекция отрисоввывала только модель-коллекцию.

@chestozo chestozo added the bug label Aug 30, 2017
@chestozo chestozo mentioned this issue Aug 30, 2017
@vitkarpov
Copy link
Member

vitkarpov commented Aug 30, 2017 via email

@chestozo
Copy link
Member Author

Я скорее про то, что ничто не мешает в зависимости коллекции добавить ещё моделей и словить багу )

@vitkarpov
Copy link
Member

vitkarpov commented Aug 30, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants