InputNumber cause Uncaught TypeError
See original GitHub issue- I have searched the issues of this repository and believe that this is not a duplicate.
Reproduction link
Steps to reproduce
Add <InputNumber />
, if click keyboard, it will cause this error. Or if put value in, it will directly cause error: <InputNumber value={10} />
If downgrade to antd 4.9.3
, it is correct, no problem.
What is expected?
Act normally.
What is actually happening?
Uncaught TypeError: Cannot read property 'toString' of undefined
at BigIntDecimal.getIntegerStr (MiniDecimal.js:149)
at BigIntDecimal.toString (MiniDecimal.js:242)
at triggerValueUpdate (InputNumber.js:249)
at collectInputValue (InputNumber.js:284)
at onInternalInput (InputNumber.js:308)
at HTMLUnknownElement.callCallback (react-dom.development.js:3945)
at Object.invokeGuardedCallbackDev (react-dom.development.js:3994)
at invokeGuardedCallback (react-dom.development.js:4056)
at invokeGuardedCallbackAndCatchFirstError (react-dom.development.js:4070)
at executeDispatch (react-dom.development.js:8243)
at processDispatchQueueItemsInOrder (react-dom.development.js:8275)
at processDispatchQueue (react-dom.development.js:8288)
at dispatchEventsForPlugins (react-dom.development.js:8299)
at eval (react-dom.development.js:8508)
at batchedEventUpdates$1 (react-dom.development.js:22396)
at batchedEventUpdates (react-dom.development.js:3745)
at dispatchEventForPluginEventSystem (react-dom.development.js:8507)
at attemptToDispatchEvent (react-dom.development.js:6005)
at dispatchEvent (react-dom.development.js:5924)
at unstable_runWithPriority (scheduler.development.js:468)
at runWithPriority$1 (react-dom.development.js:11276)
at discreteUpdates$1 (react-dom.development.js:22413)
at discreteUpdates (react-dom.development.js:3756)
at dispatchDiscreteEvent (react-dom.development.js:5889)
Environment | Info |
---|---|
antd | 4.15.0 |
React | 17.0 |
System | Mac OSX |
Browser | Chrome 90 |
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
InputNumber: JavaScript errors when used inside composite ...
Uncaught TypeError: Cannot read property 'replace' of undefined at bK.bB (inputnumber.js.xhtml?ln=primefaces&v=8.0:14).
Read more >WidgetVar InputNumber Primefaces 6.1 not working
I'm migrate from Primefaces 5.2 to 6.1. But, I was using widgetVar in inputNumber, for resolving operations ...
Read more >HTMLInputElement.stepUp() - Web APIs | MDN
The HTMLInputElement.stepUp() method increments the value of a numeric type of element by the value of the step attribute, or the default ...
Read more >JavaScript undefined Property - W3Schools
The undefined property indicates that a variable has not been assigned a value, or not declared at all. Browser Support. undefined() is an...
Read more >InputNumber - Ant Design
Enter a number within certain range with the mouse or keyboard. When To Use. When a numeric value needs to be provided. Examples....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@fengerzh 确实是这样的,我刚好也用到了这个rsa加密库,感谢
最后找到问题的根源是在另外一个地方有如下这样的定义:
BigInt重复定义导致的冲突,把BigInt改名之后就好了。