Refinement Lists not persisting when affected by a Vue Transition.
See original GitHub issueBug š
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:
- Created 3 years ago
- Comments:8 (3 by maintainers)
Top GitHub Comments
@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! š
Hmm, I thought I tried v-show but will double check!