question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItĀ collects links to all the places you might be looking at while hunting down a tough bug.

And, if youā€™re still stuck at the end, weā€™re happy to hop on a call to see how we can help out.

Refinement Lists not persisting when affected by a Vue Transition.

See original GitHub issue

Bug šŸž

What is the current behavior?

Iā€™m using a set of refinements that Iā€™d like to show/hide with a Vue <transition>. Have tried either basic transition setup as per the Vue docs. When the elements are transitioned in (what seems to be) any way at all, the refinements are all cleared

Make a sandbox with the current behavior

Link to sandbox example, enable a refinement then click the ā€œToggle Refinementsā€ under the search bar. Note the list transitions to the left and the search results change. Toggling the list again reveals it and you can see the refinement/s have been cleared/reset.

What is the expected behavior?

Refinements should remain active, the DOM elements donā€™t appear to be being re-rendered but the state attribute in the Vue components is quickly flicking from null back to itā€™s loaded state which seems to be clearing the refinements.

Does this happen only in specific situations?

Seems to happen with any type of transition at all.

What is the proposed solution?

To retain the state of any refinements that are subject to a transition

What is the version you are using?

Latest, as per sandbox.

Happy to provide any further details if necessary.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
AdrianwithaWcommented, Aug 20, 2020

@Haroenv yeah thatā€™s right. Worth mentioning though you can also use transitions by having two different sets of classes that the DOM element will toggle between depending on a variable or some other condition - arguably the equivalent of a v-show / v-hide transition. This bug also occurs then, and in that case the refinements still lose their state.

Iā€™ve had to use a standard JavaScript class toggle in my case, so was fixable. But definitely some inconsistent behaviour with the component states that can cause issues. Appreciate the discussion about it! šŸ‘

1reaction
AdrianwithaWcommented, Aug 19, 2020

Hmm, I thought I tried v-show but will double check!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Timing issue with Algolia and VueJs when customising the ...
The issue I am having is that in the mounted function in VueJs Algolia is building up the refinement list, and then doing...
Read more >
[Solved]-Vue Transition Not Affecting Each Element-Vue.js
It turns out that this was not an issue of transitions, but of the child elements not having the position: absolute; top: 0;...
Read more >
Enter/Leave & List Transitions - Vue.js
On this page, we'll only cover entering, leaving, and list transitions, ... If no CSS transitions/animations are detected and no JavaScript hooks areĀ ......
Read more >
Just-in-Time Mode - Tailwind CSS
Preview features are not covered by semantic versioning and some details may change as we continue to refine them. Tailwind CSS v2.1 introduces...
Read more >
ais-refinement-list | Vue InstantSearch - Algolia
The sort option only affects the facets that are returned by the engine, not which facets are returned. This widget also implements search...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found