Skip to content

Template onCreated before templates:forms package #101

@paulbalomiri

Description

@paulbalomiri

Hi,
I think there is no clean way to install a created (or any other) hook before createFactory is called.
I thought about a PR, but in any way i think of it it's not backward compatible.

  • Use case: a template producing action,schema and data arguments from some collection and id template arguments.

Workaround for onCreated:

Template.form.onCreated ->
  ## some custom init
reactiveForms.createFormBlock
    template: 'form'
    submitType: 'normal'
Template.form.onCreated Template.created
delete Template.form.created

Is there any chance for the future to switch to using onCreate at register time, and announce the breaking chage?

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