Comments (6)
Actually my problem is that, when editing cell content (after doubleclick), one cannot paste anything into the cell.
(I tried pasting react-datasheet
into A1 but failed, so basically expected behavior of input box is violated)
from react-datasheet.
@zachguo
One way to fix this would be to add the indexes right here:
https://github.com/nadbm/react-datasheet/blob/master/src/DataSheet.js#L109
The alternative is to store the index on the cell's data itself since onPaste returns {cellData, pastedData} on for each cell. I guess it can be cumbersome as each cell needs to be initialized with the proper indexes.
Edit: The reason I did not add indexes initially is that sometimes the pasted cells go BEYOND the available cells, so sometimes there is no index that fit the current cells. Feel free to make a PR for this, and null indexes when the paste is out of bounds
from react-datasheet.
I see, that's a different issue, and definitely a bug to be fixed. Basically should not be calling internal onPaste function if the cell is in editing mode
from react-datasheet.
Could you point to me where to change to get this fixed? I tried searching input
and editing
, but it's still not clear to me where to change.
from react-datasheet.
@zachguo I just pushed a commit, I'll get around to adding tests for it and pushing it to npm. But that should do it
from react-datasheet.
@nadbm Amazing, thanks!
from react-datasheet.
Related Issues (20)
- Callback while typing
- onCellsChange doesn't re-render changed cells HOT 1
- isCellNavigable is ignored when holding shift
- [Question]can react-datasheet work with Redux? HOT 1
- [Question] validate user's input when using react-datasheet as data input form HOT 1
- When I copy and paste from MS excel I am not getting exact value HOT 3
- Excel like Freeze Column HOT 1
- [Question] How to handle onDoubleClick for each cell? HOT 1
- Are types for default renderers, cell etc. missing?
- How to (programmatically) select all cells, then copy?
- feature request: influence enter key handling
- Allow Tab key in order to go out from the DataSheet to focus other DOM elements
- Bug: Copy and paste from MS Excel on a Windows machine pastes an extra empty cell HOT 1
- How do I initialize a datasheet with empty columns and rows which fills up my container? HOT 1
- What to use instead of deprecated `onPaste` function HOT 1
- Feature Request: Export as Excel/CSV HOT 2
- Does CTRL+Z word for undoing a paste? HOT 1
- Where can I see the code examples that are on the website? HOT 2
- Paste more rows than that is defined by the `grid`. HOT 2
- Deleting rows with Action Button HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-datasheet.