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

Mention the selectedRanges for handleContextMenu in the documentation #359

Closed
MarcusElg opened this issue Mar 19, 2024 · 7 comments
Closed

Comments

@MarcusElg
Copy link

I've added multiple custom actions such as removing a row. This works fine when selecting an entire row, but I would also be able to remove a row just by selecting a single cell, like it works in Google docs. However looking at https://reactgrid.com/docs/4.0/2-implementing-core-features/5-context-menu/ the only inputs are selectedRowIds and selectedColIds. Both these are empty arrays when the selection mode is "range". So how would access the selected positions?

@qiufeihong2018
Copy link
Contributor

@MarcusElg In fact, onContextMenu has a fifth parameter, selectedRanges, which is the selection range

image

@MarcusElg
Copy link
Author

@MarcusElg In fact, onContextMenu has a fifth parameter, selectedRanges, which is the selection range

image

Great! That should definitely be mentioned in the documentation...

@MarcusElg MarcusElg changed the title How to access selected cells for range selection in context menu? Mention the selectedRanges for handleContextMenu in the documentation Mar 26, 2024
@qiufeihong2018
Copy link
Contributor

Done,PR:silevis/reactgrid-website#25

@krishnamurti-brevitaz
Copy link

@qiufeihong2018 , can you please check this again. I don't see "selectedRanges" mentioned in Docs. Thank you

@qiufeihong2018
Copy link
Contributor

@webloopbox Is not yet published? @krishnamurti-brevitaz

@webloopbox
Copy link
Contributor

webloopbox commented May 14, 2024

@webloopbox Is not yet published? @krishnamurti-brevitaz

The docs have been recently updated

image

@qiufeihong2018
Copy link
Contributor

Thank you @webloopbox

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

No branches or pull requests

4 participants