yadcf - custom_select selectize bizarre behavior

梦想的初衷 提交于 2019-12-19 11:05:23

问题


Trying to use custom_select with selectize and I am seeing bizarre behavior. The select field gets duplicated as do the reset buttons, and when I pick one of the selects, the fields multiply.

Initializing selectize with

  var _selectize;
  yadcf.initSelectPluginCustomTriggers(
    function($filterSelector) {
      _selectize = $filterSelector.selectize({});
    },
    function($filterSelector) {
      _selectize.refreshItems()
    },
    function($filterSelector) {
      _selectize.destroy()
    });

Initializing yadcf with

var yadcf_options = [{
  'column_number': 0,
  'filter_container_id': "_rrwebapp_filtername",
  'filter_type': "multi_select",
  'select_type': 'custom_select',
  'select_type_options': {
    'width': '30em',
  },
  'filter_reset_button_text': 'all',
}, {
  'column_number': 1,
  'filter_container_id': "_rrwebapp_filterseries",
  'filter_reset_button_text': 'all',
}, ];

See http://codepen.io/louking/pen/KzVwwg for details

Compare to when using select2 (which has another problem, but that's for another question) http://codepen.io/louking/pen/RarNwd

来源:https://stackoverflow.com/questions/35830152/yadcf-custom-select-selectize-bizarre-behavior

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!