GithubHelp home page GithubHelp logo

Comments (6)

zachguo avatar zachguo commented on May 18, 2024 1

Actually my problem is that, when editing cell content (after doubleclick), one cannot paste anything into the cell.
n53dkfbdcj
(I tried pasting react-datasheet into A1 but failed, so basically expected behavior of input box is violated)

from react-datasheet.

nadbm avatar nadbm commented on May 18, 2024

@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.

nadbm avatar nadbm commented on May 18, 2024

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.

zachguo avatar zachguo commented on May 18, 2024

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.

nadbm avatar nadbm commented on May 18, 2024

@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.

zachguo avatar zachguo commented on May 18, 2024

@nadbm Amazing, thanks!

from react-datasheet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.