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

Don't freeze checkbox / selection column #1386

Closed
4 of 11 tasks
sontek opened this issue Nov 16, 2018 · 21 comments
Closed
4 of 11 tasks

Don't freeze checkbox / selection column #1386

sontek opened this issue Nov 16, 2018 · 21 comments

Comments

@sontek
Copy link

sontek commented Nov 16, 2018

  • Have you already searched for similar issues? Please help us out and double-check first!
    Yes, I've also looked at the code.

  • Also, please don't be that person who deletes this template. It's here for a reason.

  • Thanks!


Which version of React JS are you using?

✅ Officially supported ✅

  • v15.4.x

⚠️ Not officially supported, expect warnings ⚠️

  • v15.5.x
  • v15.6.x

☣️ Not officially supported, expect warnings and errors ☣️

  • v16.x.x

Which browser are you using?

✅ Officially supported ✅

  • IE 9 / IE 10 / IE 11
  • Edge
  • Chrome

⚠️ Not officially supported, but "should work" ⚠️

  • Firefox
  • Safari

I'm submitting a ...

  • 🐛 Bug Report
  • 💡 Feature Request

👋 Need general support? Not sure about how to use React itself, or how to get started with the Grid?
Please do not submit support request here. Instead see

https://github.com/adazzle/react-data-grid/blob/master/CONTRIBUTING.md


Issue Details

I'm trying to use the rowSelection property to add a checkbox column onto my table. But it is setting frozen: true which is unexpected behavior. I don't want, need, or like the frozen behavior. It means when my table is on mobile the space is used up by the checkbox so they view less data. The setting seems to be here:

Can you at least offer an option like rowSelection { freeze: false }?

@sontek
Copy link
Author

sontek commented Nov 19, 2018

This is actually a problem on more than mobile even though that was my original concern. The frozen columns is really delayed and so the user experience isn't great for what we are trying to provide our users. So I think just a setting to say "don't freeze checkbox columns" would be enough for us.

nov-19-2018 12-36-28

@shreyamdg
Copy link

Are you sure? It works great for me!

ezgif-1-7e46dd60dd87

@sontek
Copy link
Author

sontek commented Dec 12, 2018

Are you using an old version? I have no idea how you got it to not freeze that column since you can see in the code I pointed to that its definitely freezing them.

It also appears in the demo:
http://adazzle.github.io/react-data-grid/docs/examples/row-selection

If you shrink the screen enough to get the columns that way.

@stale
Copy link

stale bot commented Jan 11, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please reopen this if you feel it has been incorrectly closed and we will do our best to look into it. Thank you for your contributions.

@stale stale bot added the wontfix label Jan 11, 2019
@sontek
Copy link
Author

sontek commented Jan 11, 2019

This is only stale because I haven't received a response yet. This issue still exists.

@stale stale bot removed the wontfix label Jan 11, 2019
@stale
Copy link

stale bot commented Feb 10, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please reopen this if you feel it has been incorrectly closed and we will do our best to look into it. Thank you for your contributions.

@stale stale bot added the wontfix label Feb 10, 2019
@sontek
Copy link
Author

sontek commented Feb 11, 2019

This still hasn't been addressed

@zekehernandez
Copy link

I am having the same issue with frozen columns in general. In Chrome, the issue only happens when I use my MacBook trackpad and not from moving the scrollbar (it also happens no matter what in Firefox, but that's not a supported browser). Simply making the columns not frozen would not be a solution for my use case, however.

Here is an example of me using the codesandbox demo for frozen columns in Chrome:
react-data-grid

@stale
Copy link

stale bot commented Mar 23, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please reopen this if you feel it has been incorrectly closed and we will do our best to look into it. Thank you for your contributions.

@stale stale bot added the wontfix label Mar 23, 2019
@sontek
Copy link
Author

sontek commented Mar 23, 2019

I don't think this is stale. We haven't heard from the maintainers on it but its definitely still a problem that is causing me and my customers pain =)

@stale stale bot removed the wontfix label Mar 23, 2019
@stale
Copy link

stale bot commented Apr 22, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please reopen this if you feel it has been incorrectly closed and we will do our best to look into it. Thank you for your contributions.

@stale stale bot added the wontfix label Apr 22, 2019
@sontek
Copy link
Author

sontek commented Apr 22, 2019

I wish the stale bot would stop closing good tickets

@stale stale bot removed the wontfix label Apr 22, 2019
@Brentox
Copy link

Brentox commented May 6, 2019

Issue still exists. Keep open

@eduardosmatheus
Copy link

eduardosmatheus commented Jun 5, 2019

Shouldn't it be buggy because of the ReactJS version in use? I'm having the same issue and my project is using v16.8.6.

I'm looking for a solution as well, and maybe there's not enough support in current releases with 16.x ReactJS features (?). Should take a look in the frozen cells rendering/updating behavior.

@liamzhang40
Copy link

The same concern here on mobile. A way to adjust to checkbox column width will also be helpful. Besides, the delayed rendering is really not the most appealing

@liamzhang40
Copy link

After investigating the stuttering behavior of frozen columns, I found out that it has something to do with trackpads' inertial scrolling which is the decelerating part of page scrolling after you lift fingers off the trackpad. And scroll/mousewheel events still fire during it. Therefore in Viewport.tsx,


isScrolling is updated with a delay with some debouncing on top of it.

Such pattern appears to also cause table headers' horizontal moves more slowly compared to that of table body.
Two obstacles I had attempting to work around this. One is to disable inertial scrolling. The other one is to hijack Canvas.tsx handleScroll because I will need access to scroll events if I want to disable inertial scrolling.

onScroll={this.handleScroll}

I have been stuck on this and any help will be appreciated.

@tareqaal
Copy link

tareqaal commented Jul 11, 2019

I solved it using CSS. I targeted the following cells to stop the transform property which make this user delay experiance:

.react-grid-Row .react-grid-Cell--frozen { transform: translate3d(0px, 0px, 0px) !important! }
.react-grid-HeaderRow .react-grid-HeaderCell--frozen { transform: translate3d(0px, 0px, 0px) !important; }

PS: the header check box cells is separate than the row body.

@liamzhang40
Copy link

liamzhang40 commented Jul 11, 2019

I solved it using CSS. I targeted the following cells to stop the transform property which make this user delay experiance:

.react-grid-Row .react-grid-Cell--frozen { transform: translate3d(0px, 0px, 0px) !important! }
.react-grid-HeaderRow .react-grid-HeaderCell--frozen { transform: translate3d(0px, 0px, 0px) !important; }

PS: the header check box cells is separate than the row body.

You just made the frozen columns always stay at the left of the viewport but they need to move as users scroll so the columns appear to be frozen. Do you mind showing a demo if it is actually working for you?

@beygorghor
Copy link

beygorghor commented Nov 22, 2019

Hi, i have the same issue, any update ?
The bug is also present on the example...
https://adazzle.github.io/react-data-grid/docs/examples/frozen-columns

@JordanSalinas
Copy link

Same issue here. Would like a response.

@amanmahajan7
Copy link
Contributor

amanmahajan7 commented Apr 29, 2020

This can be achieved in v7 canary

https://github.com/adazzle/react-data-grid/blob/canary/CHANGELOG.md
https://adazzle.github.io/react-data-grid/canary/?path=/story/demos--common-features
https://github.com/adazzle/react-data-grid/blob/canary/stories/demos/CommonFeatures.tsx#L45

you should be able to do

const columns: readonly Column<Row, SummaryRow>[] = [
  { SelectColumn, frozen: false },
  ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants