Autoform-typeahead 输出限制

Autoform-typeahead output limitation

我在我的 meteor 应用程序中使用 comerc:autoform-typeahead 包(它与 aldeed:autoforms 一起使用)来实现提前输入。 DOCS 说我们可以这样使用它

{   
    tags: {
    type: String,
    autoform: {
      type: "typeahead",
      afFieldInput: {
        typeaheadOptions: {},
        typeaheadDatasets: {}
      }
    }   
  } 
}

这个包有效,并且显示所有匹配结果。问题是,我们如何限制我们的输出(例如,限制为 5)? 这些解决方案:

typeaheadOptions: {limit : 5}

typeaheadDatasets: {limit: 5}

不工作。

第二个问题:是否有其他带有 limit 选项的 autoforms typeahead 包?

您可以将限制放在服务器端搜索方法中。我的问题here会对你有参考价值