Skip to content
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

Increment/decrement NumberInput with arrow keys doesn't trigger onValueChange callback #5856

Closed
1 of 2 tasks
stevezhu opened this issue Mar 2, 2024 · 1 comment
Closed
1 of 2 tasks
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)

Comments

@stevezhu
Copy link

stevezhu commented Mar 2, 2024

Dependencies check up

  • I have verified that I use latest version of all @mantine/* packages

What version of @mantine/* packages do you have in package.json?

7.6.1

What package has an issue?

@mantine/core

What framework do you use?

Vite

In which browsers you can reproduce the issue?

Chrome

Describe the bug

With a simple setup like below, typing in the input will log for both callbacks, but using the arrow keys will only log for onChange and not onValueChange.

<NumberInput
  label="Amount"
  onChange={(value) => {
    console.log({ value });
  }}
  onValueChange={(values, sourceInfo) => {
    console.log({ values, sourceInfo });
  }}
/>

If possible, include a link to a codesandbox with a minimal reproduction

https://codesandbox.io/p/sandbox/mantine-react-template-forked-tj3h3l?file=%2Fsrc%2FApp.tsx%3A8%2C23

Possible fix

No response

Self-service

  • I would be willing to implement a fix for this issue
@stevezhu stevezhu changed the title Increment/decrement NumberInput with arrow keys doesn't trigger onValueChange callback Increment/decrement NumberInput with arrow keys doesn't trigger onValueChange callback Mar 2, 2024
@stevezhu stevezhu changed the title Increment/decrement NumberInput with arrow keys doesn't trigger onValueChange callback Increment/decrement NumberInput with arrow keys doesn't trigger onValueChange callback Mar 2, 2024
rtivital added a commit that referenced this issue Mar 12, 2024
@rtivital rtivital added the Fixed patch Completed issues that will be published with next patch (1.0.X) label Mar 12, 2024
@rtivital
Copy link
Member

Fixed in 7.6.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)
Projects
None yet
Development

No branches or pull requests

2 participants