Skip to content

Commit

Permalink
[@mantine/core] NumberInput: Fix incorrect events handling for compos…
Browse files Browse the repository at this point in the history
…ite events (#1935)

* fix NumberInput on Pinyin input method

* fix NumberInput on Pinyin input method

Prettier format
  • Loading branch information
huijiewei committed Aug 12, 2022
1 parent a97aaf5 commit bc711ee
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/mantine-core/src/NumberInput/NumberInput.tsx
Expand Up @@ -314,6 +314,11 @@ export const NumberInput = forwardRef<HTMLInputElement, NumberInputProps>((props
);

const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {
const evt = event.nativeEvent as InputEvent;
if (evt.isComposing) {
return;
}

const val = event.target.value;
const parsed = parseNum(val);

Expand Down

0 comments on commit bc711ee

Please sign in to comment.