Skip to content
This repository was archived by the owner on May 19, 2025. It is now read-only.
This repository was archived by the owner on May 19, 2025. It is now read-only.

Firestore Live Binding Splices Multiple Times. #326

@Westbrook

Description

@Westbrook

Description

When a live collection is mapped to with more than one property:

messages: {
        type: Array,
        collection: '{roomType}/{roomName}/events',
        live: true
}

vs the more standard

messages: {
        type: Array,
        collection: 'rooms/{roomName}/events',
        live: true
}

The bindings are triggered twice.

Expected outcome

Getting a fourth item from remote on live update should turn:

Item 1
Item 2
Item 3

into

Item 1
Item 2
Item 3
Item 4

Actual outcome

Item 1
Item 2
Item 3

turns into

Item 1
Item 2
Item 3
Item 4
Item 4

and then into

Item 1
Item 2
Item 3
Item 4
Item 5
Item 5
Item 4

Steps to reproduce

  1. Create a component with the Firestore mixin.
  2. Making a live binding of a property to a collection, mapping to that collection with two properties
messages: {
        type: Array,
        collection: '{roomType}/{roomName}/events',
        live: true
}
  1. Add data.
  2. See it spliced in twice.

Browsers Affected

  • Chrome
  • Firefox
  • Safari 9
  • Safari 8
  • Safari 7
  • Edge
  • IE 11
  • IE 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions