rifanece / jquery-datatables-column-filter

Automatically exported from code.google.com/p/jquery-datatables-column-filter
0 stars 0 forks source link

A select column filter does not work after a fnReloadAjax #70

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a table with empty tbody
2. Use the server-side process (return json_encode: mysql rowset)
3. Each select is populated correctly
4. Add a row with a new value
5. After adding call fnReloadAjax on table
6. The select is not updated

What version of the product are you using? On what operating system?
Last version of JQuery, DataTables and jquery-datatables-column-filter.
Production environment: Windows Server 2008R2 (5.3.2)
Development environment: Windows Server 2003 (PHP 5.4)

Ty for all work

Original issue reported on code.google.com by michele....@nogap.it on 27 Jun 2012 at 8:35

GoogleCodeExporter commented 9 years ago
This is fnRealoadAjax implementation:
$.fn.dataTableExt.oApi.fnReloadAjax = function ( oSettings, sNewSource ) {
    if ( typeof sNewSource != 'undefined' ) {
        oSettings.sAjaxSource = sNewSource;
    }
    this.fnClearTable( this );
    this.oApi._fnProcessingDisplay( oSettings, true );
    $.getJSON( oSettings.sAjaxSource, null, $.proxy(
        function(json) {
            for ( var i=0 ; i<json.aaData.length ; i++ ) {
                this.oApi._fnAddData( oSettings, json.aaData[i] );
            }

            oSettings.aiDisplay = oSettings.aiDisplayMaster.slice();
            this.fnDraw( this );
            this.oApi._fnProcessingDisplay( oSettings, false );
        },
        this
    ));
};

Original comment by michele....@nogap.it on 27 Jun 2012 at 9:11

GoogleCodeExporter commented 9 years ago
Please see my comments on Issue 34.  Select and Checklist options, if given 
with no values, don't generate any values in the select list when data is 
populated with "aaData".

Original comment by KAkkape...@gmail.com on 14 Sep 2012 at 5:11