question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[TextField] type=number missing min, max, step Typescript types

See original GitHub issue
  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

<TextField type="number" min="0" max="10" step="1" /> should compile with Typescript

Current Behavior

Receive following Typescript error for min, similar for max and step: [ts] Property 'min' does not exist on type 'IntrinsicAttributes & TextFieldProps & { children?: ReactNode; }'.

Your Environment

Tech Version
Material-UI 1.0.0-beta.21
React 16.0.0
Typescript 2.6.1

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

189reactions
pelotomcommented, Nov 27, 2017

Does this work?

<TextField type="number" inputProps={{ min: "0", max: "10", step: "1" }} />
10reactions
djwashburncommented, Nov 4, 2019

This seems like an overly complicated workaround

Read more comments on GitHub >

github_iconTop Results From Across the Web

[TextField] type=number missing min, max, step Typescript types
Receive following Typescript error for min, similar for max and step: [ts] Property 'min' does not exist on type 'IntrinsicAttributes & ...
Read more >
Set min/max on TextField type="number"? - Stack Overflow
I have a Field that is type number and I want to set the min and max values on the tag. I've tried...
Read more >
Why the number input is the worst input - Stack Overflow Blog
If you used input type="number", you may be surprised to find that it doesn't. Avatar for ... The min/max attributes can easily be...
Read more >
HTMLInputElement | typescript - v3.7.7 - Microsoft Open Source
Defines the maximum acceptable value for an input element with type="number".When used with the min and step attributes, lets you control the range...
Read more >
How To Hide Arrows From Number Input - W3Schools
Learn how to remove arrows/spinners from input type number with CSS. Try to hover over both number inputs to see the difference: Hidden...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found