Skip to content

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

Description

@chestozo

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

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, либо не давать ей зависеть от других моделей - т.е. чтобы коллекция отрисоввывала только модель-коллекцию.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions