我有一个名为 inboxSection
的模板。在该模板中我有一个 reactive table 。代码看起来像这样:
template(name="inboxSection")
.col-xs-12.curator-inbox-section-head
.pull-left
b {{formattedDate}}
.pull-right
+reactiveTable collection=posts settings=settings selector=selector class="curator-inbox-table" rowClass="curator-inbox-table-row"
我想在 react 表渲染后执行一段代码。我曾尝试将其放置在 inboxSection
的 onCreated
事件中,如下所示:
Template.inboxSection.onCreated ->
# do something with the reactive table...
但这不起作用。如何在 react 表渲染后执行一些代码?
最佳答案
尝试
Template.inboxSection.onRendered ->
看看这是否有效。
关于javascript - 如何在 react 表渲染后执行代码?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40161621/