Skip to content

Alternative node template syntaxΒ #25

@KjetilHaaheim

Description

@KjetilHaaheim

Component node templates are currently based on nodeComponent property in the dataset. This proposition is to incorporate one or both of the following suggestions:

  1. Node template by slot (#default or #named). This can prevent some prop drilling.
<flowy :nodes="items">
  <template v-slot:default="{ node }">
    <flow-item v-bind="node" />
  </template>
</flowy>
  1. Component as data property:
<flowy :nodes="items" :node-component='$options.FlowItem' />

Both suggestions are compatible with multiple block types in same collection if neccessary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions