Skip to content

Grips lost after resizing when using fancytree grid  #121

@emcodem

Description

@emcodem

Hi,

my problem is that my table takes a while to get into the final resized state but colResizable fires onResize internally when the "window" finished resizing. This ends up in misplaced grip handles for me.
Looking at the source code of colResizable, i didnt find any way to "force" the resizing, so i wanted to ask what would be a nice way to deal with it.
Currently i solve it by destroying and recreating it:


window.onresize = function(){
    window.setTimeout(function(){
  	  recreateGrips("#treetable_active")
  	  recreateGrips("#treetable_history")
    },1500)
};

function recreateGrips(tree_id){
  		  $(tree_id).colResizable({
  		     disable:true
  		  });			
                        $(tree_id).colResizable({
  			  resizeMode: 'fit',
  			  hoverCursor: "col-resize",
  			  dragCursor: "col-resize",
  			  postbackSafe: true,
  			  useLocalStorage: true,
  			  minWidth: 10,
  			  liveDrag: true,
  			  removePadding : true
  		  });
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions