You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i tried to give the DisclosurePanels which are generated in a v-for a ref. So the idea is, when anybody is clicking on a button elsewhere at the page, we open the panel and scroll the browser window down to the current open panel. For this i defined this at the setup:
setup() { const accordions = ref([]); }
in my v-for loop i gave the panel the ref dynamical:
Finally the page has only 10 Panels in the Disclosure.
But i don't understand what is the problem with the ref array. The are around 45 items and a lot ar undefined.
How can i just getting the rendered 10 by the key to hopefully jump to it later with a call like this?
goto(refName) { var element = this.$refs[refName]; var top = element.offsetTop; window.scrollTo(0, top); }
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
i tried to give the DisclosurePanels which are generated in a v-for a ref. So the idea is, when anybody is clicking on a button elsewhere at the page, we open the panel and scroll the browser window down to the current open panel. For this i defined this at the setup:
setup() { const accordions = ref([]); }
in my v-for loop i gave the panel the ref dynamical:
<job-accordion-panel :current-region="index" :panel-jobs="jobs[index]" :key="region" :ref=" (el) => { if (el !=== undefined) { accordions[region] = el; } } " ></job-accordion-panel>
Finally the page has only 10 Panels in the Disclosure.
But i don't understand what is the problem with the ref array. The are around 45 items and a lot ar undefined.
How can i just getting the rendered 10 by the key to hopefully jump to it later with a call like this?
goto(refName) { var element = this.$refs[refName]; var top = element.offsetTop; window.scrollTo(0, top); }
Beta Was this translation helpful? Give feedback.
All reactions