Skip to content

Using a fully featured vue component as the preview template #162

Open
@NikiSchlifke

Description

@NikiSchlifke

Description:

For the purposes of keeping code DRY I'd like to use the html from a existing component as the preview template.
Right now, at least according to the documentation I was able to find we are supposed to give the previewTemplate prop a function that returns HTML.
I think it would be nicer if it were possible to use a component that was for instance imported from a .vue file.

Steps To Reproduce:

I've tried to import the component and attach it to the data property of the parent that contains the vue2-dropzone component.
Passing the data property itself or something akin to

<dropzone :previewTemplate="previewTemplate.render">

does not work, as the render function has not been created when the dropzone component is loaded.
It probably shouldn't, but maybe there is a way?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions