SlickGrid icon indicating copy to clipboard operation
SlickGrid copied to clipboard

Issue in forceFitColumns option

Open nzhtrtlc opened this issue 7 years ago • 8 comments

Hi, there is an issue in forceFitColumns option or this.grid.autoSizeColumns(); In my grid which have lot of columns i want to fit my columns but there is an style issue about it. Here is the screen record for you https://drive.google.com/file/d/1zuYPKvU02OFepvjeS5fvoJh3G0BG2Iep/view

I have no problem with less columns, but with lot of columns it brokes like in video.

nzhtrtlc avatar May 31 '18 02:05 nzhtrtlc

Could you try reproducing this on the Simplest Example. Start with that, increase the number of columns and apply the flag. As minimal changes as possible to repro the problem.

You can attach the result to your next issue post, and I'll add it to the repo in the Test folder, or the Example folder if this turns out to be a configuration issue that needs more demonstration. This way we can both work on a shared file.

6pac avatar May 31 '18 02:05 6pac

@6pac You are right the problem is in my own code. My grid is in my own tab component (i am usign react) When i take my grid out of the tab component it works great but when i put it back to tab component it brokes as in the video record. I have no idea why is happening :(

nzhtrtlc avatar Jun 01 '18 15:06 nzhtrtlc

Could that be a problem because of #239 ?

ghiscoding avatar Jun 01 '18 15:06 ghiscoding

It's not throwing any errors in the console? If it was #239, could the issue still occur if there was no dragging and dropping attempted in the repro? I'm assuming overriding the events could cause errors, but they'd presumably be visible as an indicator.

6pac avatar Jun 02 '18 07:06 6pac

not necessarily, I think in the sample I provided it just change the behavior

ghiscoding avatar Jun 02 '18 14:06 ghiscoding

I think reworking SlickGrid to remove the jQuery drag and drop dependencies is a great idea. HOWEVER, articles like this one scare the hell out of me. Seems no-one has posted much about native browser HTML5 Drag and Drop since 2010 - there's a lot of talk from that year (eg. here, here and more recent but less complete here ), but I can't find anywhere where someone has said 'this is all resolved now'. So I'm forced to conclude that we're opening a big time can of worms trying to do that - and that's what the contributor who originally tried and failed to do it said: see https://github.com/6pac/SlickGrid/issues/14 https://github.com/6pac/SlickGrid/issues/15

6pac avatar Jun 04 '18 05:06 6pac

@6pac No its not throwing any errors in console. I removed that option then i gave manuel width instead of autoSize option. This is how i solve the problem for now.

nzhtrtlc avatar Jun 06 '18 12:06 nzhtrtlc

OK @nzhtrtlc, I think that's the best for now. @ghiscoding is right, this problem may be solved on a different branch, I've just got to check it out and work out how that fits in with the main repo.

6pac avatar Jun 06 '18 22:06 6pac

Since this issue was opened in 2018, the entire structure of the project changed, we removed jQuery/jQueryUI and now use SortableJS for dragging column (we had to find a replacement for jQueryUI drag and SortableJS was what we chose). We also recently migrated to TypeScript so the a lot of the original code got reworked.

I think it's best to close this issue since it is very out of date with our new structure, please add more details if you think this is still an issue with latest code

ghiscoding avatar Sep 27 '23 15:09 ghiscoding