BUG - Perspective Numeric Entry Field as unicode


The Numeric Entry Field component’s props.value property is of type ‘unicode’ instead of a numeric data type.


This happens when the user has not entered anything.

Is it a bug or a feature? I need to know to decide how to validate the entries.

thank you

This is a consequence of the front-end world’s reliance on Javascript, and therefore, loose types.
You can just int(pis) and catch ValueError - if the input is already an integer it will be returned unmodified, and if it’s an invalid state you can handle the failure accordingly.