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.

Props from mixin object aren't parsed

See original GitHub issue

Current behavior

Props defined in a constant that works as a mixin don’t show up in the results of using vue-docgen-api’s parse method.

We are keeping all props in a separate mixin object which gets exported as well (mainly because we have e.g. a UrlInput and a UrlField component - in this way the UrlField component can easily take on the same props from UrlInput plus additional ones).

To reproduce

export const props = {
  props: {
    autocomplete: {
      type: String,
      default: "url"
    },
    type: {
      type: String,
      default: "url"
    }
  }
}

export default {
  mixins: [props]
}

Output generates no props data at all.

Expected behavior

Output should feature data on autocomplete and type prop.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
distantnativecommented, May 25, 2021

On first look, works great in our setup. Thanks a lot for the effort and so quickly!

1reaction
elevatebartcommented, May 22, 2021

Hey @distantnative,

I appreciate the concern. You will get a fix or an answer probably by tonight.

In any case, this does not seem like a complicated fix. I do not expect it to take more than a week to fix.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Vue: passing dynamic props to mixin [closed] - Stack Overflow
A mixin isn't called, the component simply inherits its properties/methods. Props are designed to be passed from parent to child components. A ...
Read more >
Props are not properly inherited from mixins / extended ...
I'm having a bunch of components that all share some properties, so I've moved them into a mixin (also tried with extending from...
Read more >
Vue Problems — Mixins, Slots, and Computed Properties
We can pass all props and listeners from parent to child by using the v-bind and v-on ... </div>. Vue will display the...
Read more >
mixin and @include - Sass
Mixins allow you to define styles that can be re-used throughout your stylesheet. They make it easy to avoid using non-semantic classes like...
Read more >
How to use the vue-property-decorator.Mixins function ... - Snyk
To help you get started, we've selected a few vue-property-decorator.Mixins examples, based on popular ways it is used in public projects.
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