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

Add onPaste event and a flag to control the missing rows addition when pasting a data #176

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

phen0menon
Copy link
Contributor

This PR implements:

Any comments are welcome.

@phen0menon phen0menon changed the title Feature/handle paste event Add onPaste event and a flag to control the missing rows addition when pasting a data Sep 27, 2021
@coveralls
Copy link

Pull Request Test Coverage Report for Build 1279883980

  • 1 of 10 (10.0%) changed or added relevant lines in 3 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.6%) to 78.963%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/actions.ts 0 1 0.0%
src/Spreadsheet.tsx 1 4 25.0%
src/reducer.ts 0 5 0.0%
Files with Coverage Reduction New Missed Lines %
src/reducer.ts 1 48.87%
Totals Coverage Status
Change from base Build 1274895115: -0.6%
Covered Lines: 727
Relevant Lines: 863

💛 - Coveralls

@iddan
Copy link
Owner

iddan commented Oct 2, 2021

Looks good! I’m on vacation until next week so I’ll try to go around it next weekend. Thank you

@phen0menon
Copy link
Contributor Author

I found that it makes no sense to send row and column indices without value. There is one idea how to deal with that - I will reply to the thread within a few days.

And there is also the idea of ignoring 'readOnly' fields when pasting some values. I have implemented it locally, gonna send to review in a few days.

@@ -70,6 +70,11 @@ export type Props<CellType extends Types.CellBase> = {
* Defaults to: `false`.
*/
hideColumnIndicators?: boolean;
/**
* If set to true, automatically creates missing rows when pasting from clipboard
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about missing columns?

@iddan iddan force-pushed the master branch 2 times, most recently from a5442a2 to 3c0c51e Compare February 5, 2022 20:23
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.

3 participants