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

feat: add customizable highlighted regions to cells #384

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

parrotmac
Copy link

@parrotmac parrotmac commented Mar 8, 2024

Hey @iddan, thanks for the great library!

This change enables users to specify highlighted regions of the sheet. My goal is to enable collaborative editing a'la Google Sheets, but it could also be used for user feedback about validation, or something else entirely. I aimed to reuse and somewhat emulate the Selection types and code path. You'll also notice I had to add an initial effect to the Cell component so that highlighting would be possible before the first user interaction. Without that, there isn't bounding rect info available to set the highlighting component coordinates.

Please let me know if there are any changes or additions requested.

Cheers!

react-spreadsheet-highlight-demo.mov

@parrotmac parrotmac marked this pull request as ready for review March 8, 2024 19:01
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

Successfully merging this pull request may close these issues.

1 participant