-
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
Incorrect cell selection if a frozen exists and the grid is scrolled down #329
Comments
Note: it's ok here http://jlynch7.github.io/SlickGrid/examples/example-frozen-columns-and-rows-spreadsheet.html |
I found a patch doing the job for me : in slick.cellrangeselector.js, function handleDrag If not defined _gridOptions.frozenColumn = _gridOptions.frozenRow = -1 ... Replace :
By :
|
I guess it could be simplified as if (!_grid.canCellBeSelected(end.row, end.cell)) {
return;
}
// when having frozen column(s), we need to do extra checks
if (_gridOptions.frozenColumn >= 0) {
if (
((!_isRightCanvas && (end.cell > _gridOptions.frozenColumn)) || (_isRightCanvas && (end.cell <= _gridOptions.frozenColumn)))
|| ((!_isBottomCanvas && (end.row >= _gridOptions.frozenRow)) || (_isBottomCanvas && (end.row < _gridOptions.frozenRow)))
) {
return;
}
} |
Not sure, we need to test frozenColumn AND frozenRow, what about if _gridOptions.frozenRow is not defined (= -1) ? |
ahh I see, you have separated the 2 types of frozen (columns/rows), I didn't realize that since both comments were very similar. Anyhow in both cases you want to Ah wait I see what you mean, I thought the |
Yes I agree, maybe it can be useful to change the comment.. A proposal:
|
yes this looks much better after a quick view at it. Have you tried your code with regular grid? I assume it's ok but we'll have to test that too. Can you make a PR for this and take the credits or you want us to do it? |
What do you mean by regular grid ? Without frozen items ? |
Yes regular grid without any frozen options set. I think it's fine but we need to test a few options to make sure nothing breaks. If you could make the PR that would be great, but if don't know how or you can't do it then let us know and we'll take it |
I understand, it seems to be ok for regular grids. |
ok might take a few days to look into this and testing it |
@mpegithub I tried your changes and that didn't work, however I went back to the source of what I copied it from |
Not working for me, sorry. In my case I have no frozen row so :
=> row 114 is always true : ( !_isBottomCanvas && ( end.row >= _gridOptions.frozenRow ) ) Or maybe I miss something ! |
@mpegithub |
Closed by PR #331 |
Hello,
In this example example-frozen-columns-and-rows-spreadsheet.html,
and in the bottom grid, if the grid is scrolled down and a selection is made, this one is incorrect: it looks like the number of scrolled lines are added to the selection...
The text was updated successfully, but these errors were encountered: