1

I have a yadcf Select2 filter that looks like this:

{column_number : 1, filter_type: "select", select_type: "select2", style_class: "subjectFilter"}

I used style_class to add a CSS class called subjectFilter. This class shows up in the DOM, and it is attached to the select box. However, the actual select2 dropdown doesn't obey the style (i.e. width) of the select box. Is it possible to add a class to the <span> tag that holds the .select-container class?

OverflowingTheGlass
  • 2,324
  • 1
  • 27
  • 75

1 Answers1

1

If you want to manipulate the select2 container you can use the select_type_options attribute,

Here is an usage example:

{ column_number : 2, select_type: 'select2', select_type_options: {width: '150px', minimumResultsForSearch: -1} }

Daniel
  • 36,833
  • 10
  • 119
  • 200