javascript - Initial selection for tablesorter filter w/ select2 -


Depending on the filtering with , I am trying to apply

The initial selection of the option for the filter and I'm living with the table that are not updating the filtered rows.

JSFiddle :.

Take a look at the first column, the xyz value should be filtered, but they are not. If you choose manual, then it works as expected.

  // *** var filter = $ .tablesorter.filterFormatter.select2 ($ Cell, Indx, {match: true, $ / (Element.val (.) Split (" {Var data = []; ")). Each (function () {data.push ({{ ID: this, text: this});}); callback (data);}}); Filter.siblings ("input.select2"). Select2 ("val", ["abc", "def"]); Return filter;   

Two things for me in this piece of code are unclear: Whether initSelection is required in this scenario and how tablers <

The original example (without making my changes) :

/ P>

Thank you for implementing this feature quickly and providing one.

I've found that the workaround:

  filter.siblings ("input.select2"). Select2 ("val", ["abc", "def"], true);  

Although it does not always work, then wrap it in setTimeout () and fix it.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -