Giter Club home page Giter Club logo

Comments (8)

armved avatar armved commented on June 15, 2024 3

I got the same problem when clicking beyond the table. Keys are triggering update once but if I click away from table then onGridRowsUpdated is triggering twice. Can you help me with this?

from react-data-grid.

bakesteve avatar bakesteve commented on June 15, 2024

Ok - managed to reproduce that behaviour here:
http://adazzle.github.io/react-data-grid/examples.html#/all-features-immutable
if I edit a text editor and hit enter, I hit handleRowUpdated twice

To resolve this we'll need a failing test first, so once we have that we'll link to this issue so you can track.
And be happy to take a pull request on that if you want to jump on it straight away - it looks like the native event may be getting fired multiple times so need to see if there is an issue with how the events are being bound / bubbling, or something else

from react-data-grid.

malonecj avatar malonecj commented on June 15, 2024

Yes, the onKeyDown event is getting bound to both the <SimpleTextEditor/> and <EditorContainer/> components. There's a failing test here dfb1de6 in PR #79

Removing the onKeyDown in <SimpleTextEditor/> will fix it

from react-data-grid.

bakesteve avatar bakesteve commented on June 15, 2024

that's done now.
One side note - internally we've hot on the async issue and would definitely recommend you move to a flux framework, rather than having the ajax call and response handler in handleRowUpdated.
From what it sounds like you are doing, i'd actually say you may want to look at some form of local storage based container, with server side sync (or a framework, like meteor et al) - but good luck with the project and thanks for letting us know about this

from react-data-grid.

gtkovas avatar gtkovas commented on June 15, 2024

Many thanks for the attention to this issue, as well as the suggestions for better use. I'm still new to the REACT ecosystem, and will be taking a look at Flux.

from react-data-grid.

dbraynard avatar dbraynard commented on June 15, 2024

@AvoJFB, do you still have this problem and what version are you using? I have this happening also. I'm using 2.0.16.

If I hit enter after edit, the event fires once, but if I click off of it somewhere else with the mouse I get two events.

from react-data-grid.

armved avatar armved commented on June 15, 2024

from react-data-grid.

sharperconcepts avatar sharperconcepts commented on June 15, 2024

Did anyone come up with a fix for this. I am seeing the react-blur event fire twice as well. I am not seeing any difference between the events. My only idea is to add a debounce to my update method to limit how often it can fire.

from react-data-grid.

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.