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

How can I use float in NumericInput #3949

Closed
KirillBychkov opened this issue Jan 30, 2020 · 5 comments
Closed

How can I use float in NumericInput #3949

KirillBychkov opened this issue Jan 30, 2020 · 5 comments

Comments

@KirillBychkov
Copy link

KirillBychkov commented Jan 30, 2020

Hello everyone. Who can tell me please, what I doing wrong? Why its convert my float to int? How can I use float in NumericInput?

import React, { useState } from 'react';
import { NumericInput } from '@blueprintjs/core';

export default () => {
  const [state, setState] = useState(0.5);

  return (
      <NumericInput
        value={state}
        stepSize={0.5}
        max={6}
        min={0}
      />
  );
};

Screenshot_20200130_094623

"@blueprintjs/core": "^3.22.3",
"react": "^16.12.0",
@KirillBychkov
Copy link
Author

Okey, if I comment out // max={6} and // min={0} it works fine. But issue is still actual. How can I use it with min and max props?

@adidahiya
Copy link
Contributor

hi @KirillBychkov, please fill out the bug report template completely, it helps debug your issue. which version of blueprint are you using? you may be encountering this bug which was fixed in a recent version: #3889

@KirillBychkov
Copy link
Author

"@blueprintjs/core": "^3.22.3",
"react": "^16.12.0",

@adidahiya
Copy link
Contributor

@KirillBychkov the issue I linked above was fixed in 3.23. please try again with the latest version. if you still have the issue then please create a code sandbox to show the issue (as shown in the issue template)

@KirillBychkov
Copy link
Author

Thanks)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants