Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

153
Views
Pass vue component to function

I am working on porting a project over to vue. I'm using muuri for a layout manager. However i need to use

grid.add(itemElem, {
  layout: false,
  active: false
});

itemElem was an html element i created with document.createElement but that is a component now. How do i pass a component to the function?

I tried

grid.add(<MyComponent />, {
  layout: false,
  active: false
});

However that doesn't work

I am using vue3 with options API

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Refs may help you along. https://vuejs.org/guide/essentials/template-refs.html#ref-on-component

Then you could pass it to your function like:

grid.add(this.$refs.myComponent, {
  layout: false,
  active: false
});
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!