流星autoForm自动保存不反映在模板中

时间:2015-03-08 04:42:29

标签: meteor meteor-autoform

使用来自 aldeed 的Meteor的现象autoform

我有一个使用自动保存的自定义表单。

{{#autoForm collection="people" id=formId type="update" class="update" doc=. autosave=true template="autoupdate"}}

我创建了一个自定义输入模板,其相关部分如下所示:

<template name="afInputText_autoupdate">
  <input type="text" value="{{this.value}}" {{atts}}/><span class="display-value">{{this.value}}</span>
</template>

显示.display-value范围,默认情况下隐藏输入(使用css),单击输入时显示输入并隐藏范围。

一切都按预期工作,包括自动保存功能,但.display-value范围内的值不会像我预期的那样自动更新。

我怀疑有关于用于创建表单的对象没有订阅相关文档的内容。我还没有理解Meteor的内部运作,但还没有想到这一点(我已经尝试过了)。

有人可以指出我正确的方向来获得更新的价值吗?

0 个答案:

没有答案