【问题标题】:Autoform-typeahead output limitationAutoform-typeahead 输出限制
【发布时间】:2016-07-18 13:22:04
【问题描述】:

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

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

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

typeaheadOptions: {limit : 5}

typeaheadDatasets: {limit: 5}

不工作。

第二个问题:有没有其他的带有限制选项的自动表单输入包?

【问题讨论】:

    标签: javascript meteor meteor-autoform twitter-typeahead simple-schema


    【解决方案1】:

    您可以在服务器端搜索方法中设置限制。我的问题here 会是你有用的参考。

    【讨论】:

      猜你喜欢
      • 2017-03-19
      • 2015-05-17
      • 1970-01-01
      • 2016-06-15
      • 2023-04-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多