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

Conflict with array-selector when updating an item in firebase  #81

Description

@albertolobrano

When an item in firebase get's updated the components call the following code. The given code will call splices on the array which causes any selected item to be deselected.

_onFirebaseChildChanged: function(event) {
this._applyRemoteDataChange(function() {
var value = this._valueFromSnapshot(event.detail.childSnapshot);
var oldValue = this._valueMap[value.firebaseKey];

      if (!oldValue) {
        this._error('Received firebase-child-changed event for unknown child "' + value.__firebaseKey__ + '"');
        return;
      }

      this._valueMap[oldValue.__firebaseKey__] = null;
      this._valueMap[value.__firebaseKey__] = value;
      this.splice('data', this.data.indexOf(oldValue), 1, value);
    });
  },

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions