-
Notifications
You must be signed in to change notification settings - Fork 423
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
fix for hidden column issue fixes #981 #985
Conversation
@ghiscoding sorry to ask again, but I have updated the ts - what is the easiest way to get it compiled to the Also, I think this will fix all of the problems. You might want to test it. |
You'll have to update your PR though because you overwrote some of my code since your branch is slightly out of sync with master. For the build, you can run either Dev mode or run a Prod Build with TypeScript Types npm run dev # without TS Types
npm run build:prod # also builds TS Types just running in Dev mode is typically enough to test, just don't include any of the files from the I'll test it tonight after work, I thought it would you a few days so I already released a version during the weekend, we can push a patch version later though |
Thanks. Yeah I noticed the leakage. A bit weird since I ran a pull, created the branch and the PR all within about 10 minutes. |
@6pac I just tried it and it's still not correct as far as I can see, the "Finish" column header still shows up when hiding it |
@ghiscoding it's a bit embarrassing, but I really can't work the TS tooling for local testing. I tested in js so I know the patch works. It's just getting the ts to flow through to dist/browser that is causing problems. I tried the dev and prod builds (had to update nodejs to get rimraf to work), and it's changing the For example, the grid init is failing with
and I notice that there is a .js file in the src folder for each .ts file. It this .js file used or is it just an artefact of What am I missing? |
that's weird, Also make sure that you ran
so inside the On the other hand, we have the CJS and ESM folders, those are single output file because new tools like RollupJS/Vite/WebPack will take care of the tree shaking, that process is executed when the user does a Prod build, it will only keep only the code you imported and remove anything else that is not associated to the import. For example if I do In conclusion, the you should get something like below in your folders dist foldersrc folder |
So I tried it again and I still see the same problem as before |
OK, yes have got it working, I don't know what was going on before. There was some locking of npm packages that I had to reboot to get rid of, I think maybe npm was having a moment. Anyway, thanks for the advice and try again now. There was a single line of code missing. I am aware of the purpose of the cjs and esm folders, although I don't meddle with them. Again thanks for the rundown. |
ah yeah that last missing line does seem to fix the issue for good :) |
src/slick.grid.ts
Outdated
if (c && c.resizable && !c.hidden) { | ||
for (j = i + 1; j < vc.length; j++) { | ||
c = vc[j]; | ||
if (c && c.resizable) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could use optional chaining here ?.
you can see more info on MDN optional chaining
src/slick.grid.ts
Outdated
c = this.columns[j]; | ||
if (c && c.resizable && !c.hidden) { | ||
c = vc[j]; | ||
if (c && c.resizable) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could use optional chaining here too ?.
@6pac you can probably give a try with the new structure and push a new release, just run I think we're pretty much done with fixes and everything, so pushing a new release would be a good time I think. Cheers |
@ghiscoding I'm happy for you to push releases (I think you've done the last few?). I do it so infrequently that it's likely I'll have tooling problems or forget to do something. Can do it if you really want, but I think it'd be better if I just did them if there was a need for me to do a number in a row. |
sure I can do it, I thought you maybe wanted to practice the releases 😋 |
Nope ;-) |
Testing fix - no action needed yet