Meteor 如何重置autoform-select2输入框 背景
我使用Meteor开发了一个web应用程序 我安装了以下软件包:Meteor 如何重置autoform-select2输入框 背景,meteor,jquery-select2,meteor-autoform,Meteor,Jquery Select2,Meteor Autoform,我使用Meteor开发了一个web应用程序 我安装了以下软件包: aldeed:autoform 5.3.0 aldeed:collection2 2.3.1 aldeed:autoform-select2 2.0.2 natestrauser:select2 3.5.1 zimme:select2-bootstrap3-css 1.4.6 问题: 我在自动表单中
aldeed:autoform 5.3.0
aldeed:collection2 2.3.1
aldeed:autoform-select2 2.0.2
natestrauser:select2 3.5.1
zimme:select2-bootstrap3-css 1.4.6
问题:
我在自动表单中使用了select2
输入框,但在提交表单后,输入框不会重置。如何使其复位(即清除内容)
初始输入框:
插入值后,即使在提交后也不会重置
这是简单的模式定义:
Schemas.TutorialSession = new SimpleSchema({
students: {
type: [Number],
label: "Students",
autoform: {
type: "select2",
afFieldInput: {
multiple: true
},
options: function() {
return [{
label: "Student1",
value: 111
}, {
label: "Student2",
value: 222
}, {
label: "2015",
value: 333
}];
}
}
}
})
大约一个月前,我为此提出了一个问题,但仍然没有解决方案。一般来说,autoform也存在类似的问题,即使用相同的模板执行更新,然后插入将携带上次更新的值。这似乎是程序包存储状态信息的方式存在问题,以防出现热代码更新。感谢您的回答。谢谢。