Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grips lost after resizing when using fancytree grid #121

Open
emcodem opened this issue May 5, 2021 · 0 comments
Open

Grips lost after resizing when using fancytree grid #121

emcodem opened this issue May 5, 2021 · 0 comments

Comments

@emcodem
Copy link

emcodem commented May 5, 2021

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
  		  });
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant