Skip to content

Commit

Permalink
fix: 🐛 data-nav related props are not updated when realigned
Browse files Browse the repository at this point in the history
  • Loading branch information
cristinecula committed Oct 30, 2019
1 parent c2fcd75 commit 3449d62
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cosmoz-data-nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,12 @@ class CosmozDataNav extends translatable(mixinBehaviors([IronResizableBehavior],
return;
}

// update instance's data-nav related props
const instance = renderedElement.__instance;
Object.entries(this._getBaseProps(index))
.forEach(([key, value]) => instance._setPendingProperty(key, value));
instance._flushProperties();

this.splice('_elements', renderedIndex, 1);
this.splice('_elements', elementIndex, 0, renderedElement);
}
Expand Down

0 comments on commit 3449d62

Please sign in to comment.