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

selectedInstance not tracking instance on realign #106

Closed
nomego opened this issue Dec 20, 2019 · 1 comment · Fixed by #110
Closed

selectedInstance not tracking instance on realign #106

nomego opened this issue Dec 20, 2019 · 1 comment · Fixed by #110
Assignees

Comments

@nomego
Copy link
Contributor

nomego commented Dec 20, 2019

In frontend, we use selectedInstance to observe when data-nav is navigating among the items and after change, call syncImageState on the new instance, causing it to sync with the external window (if available) to make it a seamless transition between items.

However, when removing an item from the items list, we call realignElements that will splice _elements and cause selectedInstance to update, but for some reason selectedInstance gets set to the removed instance, causing the syncImageState to fail.
Manipulated the selected property will make data-nav sync up again and correctly recalculate selected elements and instances.

@nomego nomego added the bug label Dec 20, 2019
nomego pushed a commit that referenced this issue Jan 8, 2020
* fix: refactor selectedInstance and selectedElement notification
* chore: update deps
* chore: update commitlint version
* chore: force ci

fixes #106
github-actions bot pushed a commit that referenced this issue Jan 8, 2020
## [3.0.7](v3.0.6...v3.0.7) (2020-01-08)

### Bug Fixes

* refactor selectedInstance and selectedElement notification ([c655e56](c655e56)), closes [#106](#106)
@github-actions
Copy link

github-actions bot commented Jan 8, 2020

🎉 This issue has been resolved in version 3.0.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging a pull request may close this issue.

3 participants