Need to Understand more about getCellsForSelection #530
Answered
by
jassmith
sudhansu36
asked this question in
Q&A
Replies: 2 comments 4 replies
-
getCellsForSelection is used in many locations and requests chunks based on its operational needs at the time. Often this is column by column. |
Beta Was this translation helpful? Give feedback.
1 reply
-
This callback is not for telling you what the new selection is but is a
bull version of getCellContent. I think you are looking to use
onGridSelectionChange.
…On Tue, Oct 11, 2022 at 1:21 AM Sudhansu Sekhar Dalai < ***@***.***> wrote:
Can you please explain more about column by column.
Also If I want to select 4 rows and 4 columns will it work?
Because for me If I am selecting 3 columns and any no's of rows its not
providing me the correct result for my selection.
In my code I am getting selection as
{x: 8, y: 15, width: 1, height: 1}// for 1 cell selection
{x: 8, y: 15, width: 2, height: 1}// for 2 cell selection
{x: 8, y: 15, width: 1, height: 1}// for 3 cell selection
{x: 10, y: 15, width: 1, height: 1}// for 3 cell selection
{x: 8, y: 15, width: 1, height: 1}// for 4 cell selection
{x: 11, y: 15, width: 1, height: 1}// for 4 cell selection
Is this the actual behavior?
—
Reply to this email directly, view it on GitHub
<#530 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAHN2ZJ42CWJCWRMMTO5FDWCUPQZANCNFSM6AAAAAARBE7U3U>
.
You are receiving this because you commented.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
sudhansu36
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
While I am using getCellsForSelection use Callback function it gives me the selection(x, y, width, height), but it only works till width 2 and if I go beyond width 2 its returning me width as 1 only. where my height is properly working.
Can any one help me why this is happening.
const getCellsForSelection = useCallback(
(selection) => {
//selection={x:1,y:1,width:1,height:1}
);
Beta Was this translation helpful? Give feedback.
All reactions