我使用Meteor开发网络应用程序。
我安装了以下软件包:
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
我在autoform中使用了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
}];
}
}
}
})