mui / mui-x

MUI X: Build complex and data-rich applications using a growing list of advanced React components, like the Data Grid, Date and Time Pickers, Charts, and more!
https://mui.com/x/
4.52k stars 1.31k forks source link

"Enter" key doesn't exit cell when quickly typing in a column that has preProcessEditCellProps #15348

Open sd-danhill opened 2 hours ago

sd-danhill commented 2 hours ago

Steps to reproduce

Link to live example: https://stackblitz.com/edit/github-dwb4re?file=src%2Fdemo.tsx

  1. Have a column that has preProcessEditCellProps defined

Current behavior

  1. Single click on a cell
  2. Press Enter key to go into edit mode
  3. Quickly make changes (e.g. remove all content, add new name) and then press Enter key

(waiting a while after you've finished typing and pressing Enter works fine)

Expected behavior

Pressing Enter should leave the cell

Context

Cell editing with keyboard to work reliably and consistently

Your environment

npx @mui/envinfo Mac Sequoia 15.0.1 Chrome Version 130.0.6723.116 ``` Don't forget to mention which browser you used. Output from `npx @mui/envinfo` goes here. ```

Search keywords: cell not exiting preProcessEditCellProps Order ID: 78997

sd-danhill commented 2 hours ago

fyi also tested this before https://github.com/mui/mui-x/issues/15058 was merged. Issue still happens pre + post change