Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82756

Strang behaviour: column resizes on click (jeditable)

$
0
0
Hello Guys,

I am using DataTables togehter with jeditable in client side mode. The relevant part of my Javascript code looks like:

buildTable = function(columns, data){ 

    var submitFunc = function(v, s) {
        return v; 
    }
    

    var tab = $(this.div).dataTable({
        "bSort": false, //disable sorting
        "bPaginate": false, //disable "show x entries"
        "bFilter": false, //remove search bar
        "bInfo": false, //remove "showing - info"
        "bDestroy": true,
                    
        "aaData": data,
        "aoColumns": columns
            
            
    });
                
    $(tab).find('td.editable').editable(submitFunc, {
        "event": "click",
        "style": "inherit",
        "callback": function(value, y) {
            var changed = tab.fnGetPosition(this);
        
            var row = tab.fnGetData(changed[0]);
        
            //update changed value in table
            tab.fnUpdate(value, row[0], row[1]);
                     
        },
        "width": "100%"
    });    
}

The buildTable function is called in an Python program, with the parameters "columns" and "data", which are both in the JSON format. I already checked them with JSONLint - they are both valid JSON strings.

My Problem is, that the column resizes, if I click in a field to edit it. Here is a video to show you, what's going on:


Does anybody of you have an idea what's the cause of this problem?

Viewing all articles
Browse latest Browse all 82756

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>