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

Bug: AG Grid React uses functions such as getSelectedNodes when dragging rows with groupsSelectsChildren={true} in Tree Data mode using the SSRM #7884

Closed
hydravion opened this issue Apr 24, 2024 · 1 comment

Comments

@hydravion
Copy link

I'm submitting a ...

[X] bug report => see 'Providing a Reproducible Scenario'
[] feature request => do not use Github for feature requests, see 'Customers of AG Grid'
[] support request => see 'Requesting Community Support'

Providing a Reproducible Scenario

Here is a plunker based on this example from the docs. All I did was to enable row dragging.

Current behavior
When using the SSRM in Tree Data mode with groupSelectsChildren={true}, one must not call getSelectedNodes and getSelectedRows, but api.getServerSideSelectionState and api.setServerSideSelectionState.

However, enabling row dragging will cause AG Grid to use functions like getSelectedNodes internally even though the user does not use them, causing this error:

AG Grid: `getSelectedNodes` and `getSelectedRows` functions cannot
be used with `groupSelectsChildren` and the server-side row model.
           Use `api.getServerSideSelectionState()` instead.

Open the console in the plunker and try dragging any row to see the error message.

Expected behavior
AG Grid should not internally use functions such as getSelectedNodes and getSelectedRows with this configuration, as they are not compatible with groupSelectsChildren.

Please tell us about your environment:
OS: Windows 11
Package manager: yarn

  • AG Grid version: 31.2.1
    From my package.json file:
    "ag-grid-community": "^31.2.1",
    "ag-grid-enterprise": "^31.2.1",
    "ag-grid-react": "^31.2.1",
  • Browser:
    Running navigator.userAgent yields Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36.

  • Language: ES6/7

Any advice for me?
Please let me know how I can work around this issue to resume developing my application.
I was in the process of implementing unmanaged row dragging with multiple rows using the SSRM in Tree Data mode.
Thank you so much!

@AndrewGlazier
Copy link
Contributor

Hello,

Thank you for reporting this - much appreciated!

Based on your description we've now reproduced this issue as a bug.

We have added this bug to our backlog and we are tracking it with the following reference and description:
AG-11486 - [SSRM] Row drag while using groupSelectsChildren or headerCheckboxSelection logs console warning

We try to fix bugs from one release to the next, so this should be fixed in the next release or the one after if it was raised too close to the next release date.

You can get an update on the status of this item on the product pipeline page:
https://www.ag-grid.com/ag-grid-pipeline/

Now that this issue is recorded in our backlog, we will soon close the GitHub issue because we will not update it when this bug is fixed in a future version of AG Grid. The best way to get an update on this item is to sign up for AG Grid new release notifications. Once a new AG Grid version is released, look for the item reference above (AG-XXXX) on the changelog page to see if it's resolved in that version:
https://www.ag-grid.com/ag-grid-changelog/

Thanks again for bringing this up with us - we appreciate your time!

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

3 participants