fooplugins / FooTable

jQuery plugin to make HTML tables responsive
https://fooplugins.com/plugins/footable-jquery/
Other
2.13k stars 637 forks source link

to fix height tbody #836

Open ru5199 opened 5 years ago

ru5199 commented 5 years ago

hi guys, first of all, thx to your effort. but i have a little problem in using this library. i want fix height of tbody, especially when i reload data. far as now if i search or filter rows, tbody height changed itself rows

i know there is options like style but i use ajax on calling data

function init_table(searchVal){ var url = CONTEXT_PATH + "/admin/main/totalMemberList.ajax";

footable1 = FooTable.init("#table-list", {
    "paging": {
        "enabled": true,
        "size": 10
    },
    "columns": [
        { "name": "title", "classes": "title", "title": "<div>title</div>"}
    ],
    "rows": $.ajax({
        contentType : "application/json",
        type        : "POST",
        url         : url,
        data        : JSON.stringify(searchVal),
        success : function(data){

        }
        ,error : function(e){
            console.log(e);
        }
    })
})

}

here my code. i tried

"rows": "options" : { "style" : "height: 300px" }, "value" : {$.ajax({ contentType : "application/json", type : "POST", url : url, data : JSON.stringify(searchVal), success : function(data){

        }
        ,error : function(e){
            console.log(e);
        }
    })}

but it didnt work. plz help me