vue-styleguidist
vue-styleguidist copied to clipboard
Does vue-styleguidist support template refs?
Hello all, I tried to access a method inside my component via ref from parent component, but it seems like vue-styelguidist does not support template refs?
Here is my attempt to write code sample in mardown https://github.com/rlynjb/uids/blob/main/src/components/data-displays/ModalUI.md but its returning undefined.
I tried this work around: https://stackoverflow.com/questions/67033933/cant-use-template-ref-on-component-in-vue-3-composition-api#answers-header but no luck.
Hello @rlynjb You are indeed absolutely right.
Given the nature of this tool and to get more speed in the demos, I re-implemented with a lot less features, the parts I needed from Vue 3. So far I was able to get away with never implementing the ref logic.
This is definitely a limitation that should be documented. I could probably figure out how to remove it. But I have less time to work on the lib at the moment.
If you want to try your hand at it, and have more time than I do, I can spend a few minutes explaining how the compilation/runtime works.
If not, I will document the limitation in the docs (FAQ + vue-live)