-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[data grid] Broken "stop editing" integration with IME e.g. Japanese #2338
Comments
This is an easy one to fix: diff --git a/packages/grid/_modules_/grid/hooks/features/rows/useGridEditRows.ts b/packages/grid/_modules_/grid/hooks/features/rows/useGridEditRows.ts
index 9de65f42..a6f97119 100644
--- a/packages/grid/_modules_/grid/hooks/features/rows/useGridEditRows.ts
+++ b/packages/grid/_modules_/grid/hooks/features/rows/useGridEditRows.ts
@@ -250,6 +250,12 @@ export function useGridEditRows(
apiRef.current.commitCellChange({ id, field }, event);
apiRef.current.publishEvent(GridEvents.cellEditStop, params, event);
}
+
+ // Wait until IME is settled.
+ if (event.which === 229) {
+ return;
+ }
+
if (isEditMode && isCellEditCommitKeys(event.key)) {
const commitParams = { id, field };
if (!apiRef.current.commitCellChange(commitParams, event)) { However, I didn't work on it because it would likely create a git merge conflict with #2098. For the test cases, a quick simple one is probably enough. It's also in the realm of open-source, so we could leave it up to the community to work on it. |
I would like to work on this issue. Can you assign me to this issue? |
Here you are 👍 |
It seems like this issue was already resolved. IMEJapanese.mp4 |
I have just tried on https://mui.com/components/data-grid/editing/#cell-editing, it's still broken for me on macOS. |
I developed a similar React component in Alibaba. The way I find to support IME is to always mount an In DataGrid, when users type "wo" in IME, "w" is always inserted as it is because here is no |
@guoyunhe Is there any code example you can show me? |
I have just tested this on AG Grid's live demo, they don't support it. The bug was reported in ag-grid/ag-grid#4435. |
Current Behavior 😯
IME keys are not processed correctly
Expected Behavior 🤔
IME keys are processed correctly
Steps to Reproduce 🕹
Steps:
Aug-14-2021.11-30-31.mp4
The same happens with Escape.
version 4.0.0-alpha.38
Context 🔦
We saw this request by email:
mui/material-ui#23044
mui/material-ui#19435
mui/material-ui#19499
mui/material-ui#23050
Sometimes, I feel that we should kill the x@mui.com email to force all communications to happen on GitHub cc @mui-org/x & @mbrookes
The text was updated successfully, but these errors were encountered: