onBlur in EditCell is not fired after implementing mouse down event to select cell
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- react, typescript
- Domain
- frontend
Research direction
Start with src/editors/textEditor.ts and the DataGrid getCellEditor path described in the issue, then run the dev server and reproduce the behavior in the AllFeatures example. Check the interaction between the mouse-down cell selection and EditCell unmounting; done means clicking another cell after editing prints “onBlur” in the console.
Written by the indexing model from the issue text.
Description
Describe the bug
After commit 7b8a205 (introduced in PR #3774), onBlur in EditCell no longer fires if the user finishes editing by clicking on another cell.
To Reproduce
- In
src/editors/textEditor.ts, add console.log('onBlur') in onBlur.
onBlur={() => {
console.log('onBlur');
onClose(true, false);
}}
- Start the dev server, open the AllFeatures example, double-click any First name cell to enter edit mode, then click a different cell.
Expected behavior
'onBlur' should be printed in the console.
Link to Minimal Reproducible Example
Environment
react-data-gridversion: beta.55react/react-domversion:
Additional context
https://github.com/adazzle/react-data-grid/pull/3774 changed the way to capture the selecting cell.
After this PR, the onBlur is not called anymore.
- The mouse down event in another cell is called to change the
selectedPosition. getCellEditorinDataGridreturns undefined because ofselectedPosition.mode === 'SELECT'. This early return causes unmount of EditCell before onBlur.
- Dominant language
- TypeScript
- Stars
- 7.7k
- Forks
- 2.2k
- Avg merge
- 11h 29m
- Merged PRs (30d)
- 23
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Comcast/react-data-grid
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Comcast/react-data-grid#4045 ·
Maintainers usually reply within 1 day
-
useGridDimensions creates the ResizeObserver in the opener's realm when the grid is portaled into another windowPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 3/5 1-2 days Newbie friendliness 68/100
Comcast/react-data-grid#4184 ·
Maintainers usually reply within 1 day
-
[Bug] Duplicate frozen column elements in DOM and key collision warning when enableVirtualization={false}Possibly taken @nstepien claimed this 69 days ago. Open
Comcast/react-data-grid#4120 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
Comcast/react-data-grid#4004 · 4 comments ·
Maintainers usually reply within 1 day
-
Pinned Rows APIOpen
Difficulty 5/5 Over a week Newbie friendliness 35/100
Comcast/react-data-grid#3940 ·
Maintainers usually reply within 1 day
All issues in Comcast/react-data-grid
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Comfy-Org/ComfyUI_frontend#20346 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
decentralized-identity/didwebvh-ts#203 ·
Maintainers usually reply within 1 day
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
lingdojo/kana-dojo#31791 · 1 comment · 5 reactions ·
Maintainers usually reply within 1 day
-
Telegram webhook: line breaks lost since switch to rich messagesPossibly taken @Kshot3000 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
github_actions security
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day