Comments (8)
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.
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.
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.
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.
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.
@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.
from react-data-grid.
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)
- Make the cell tooltips keyboard accessible. HOT 2
- Editor getting activated on ANY key press HOT 1
- String field cannot be focused when trying to edit it
- Calculated Column is incorrectly not rendered when spanning multiple columns
- React Server Components Support
- UI Crash from NextJS HOT 19
- Header cell collapses when resizable set to true and promoted to staging environment HOT 16
- (Chrome) Scrollbar not working when parent/grandparent's scrollbar is visible
- Columns with auto width are not adjusted when rows are added after 1st render HOT 1
- Grouping & Sorting with different fields at same time
- Crash on click on grouping row when `onFill` is set
- Sorting and filter is not working using react data grid HOT 1
- Cannot read properties of undefined (reading 'parent')
- `onCellKeyDown `does not trigger on header cells.
- react-data-grid css design break when production mode in next.js project. HOT 2
- React Data Grid Ul crashes after running npm run build and npm run start---next.js
- Is there a notes for an updates? HOT 3
- vertical scroll is not working as expected when first column is frozen
- Make Cell Absolute HOT 2
- How can we use the original editOnClick API or implement similar functionality with an existing version? 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-data-grid.