Filter

Filter

  • Filter需要template的配置值.
  • template应该是要与用户输入字符串进行比较以进行过滤的数据数组中对象的键.
  1. const droplab = new DropLab();
  2. const list = document.getElementById('list');
  3. droplab.init(trigger, list, [Filter], {
  4. Filter: {
  5. template: 'text',
  6. },
  7. });
  8. id: 0,
  9. text: 'Jacob',
  10. }, {
  11. id: 1,
  12. text: 'Jeff',
  13. }]);