Individual column searching (text inputs) not working in my rails code

后端 未结 1 2011
猫巷女王i
猫巷女王i 2021-01-27 11:53

Individual column searching (text inputs) is not working in my rails code.
My mappings.js file :

            $(document).ready(function(){

              $(\         


        
1条回答
  •  礼貌的吻别
    2021-01-27 12:42

    Try this

    //Apply the search
        table.columns().eq( 0 ).each( function ( colIdx ) {
            $( 'input', table.column( colIdx ).footer() ).on( 'keyup change', function () {
                table
                    .column( colIdx )
                    .search( this.value )
                    .draw();
            } );
        } );
    

    working Demo

    0 讨论(0)
提交回复
热议问题