-
Notifications
You must be signed in to change notification settings - Fork 734
Infra/masked input to ts #1976
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
Infra/masked input to ts #1976
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider moving the screen to TS as well.
Also, the screen did not work as expected for me, typing more than one char in the first example did not always work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could not comment on older conversations so I had to re-create them :/
I think you might have missed this.
I think that using the computer's keyboard is the issue, using the simulator \ Android works. |
@M-i-k-e-l |
* @gif: https://camo.githubusercontent.com/61eedb65e968845d5eac713dcd21a69691571fb1/68747470733a2f2f6d656469612e67697068792e636f6d2f6d656469612f4b5a5a7446666f486f454b334b2f67697068792e676966 | ||
* @example: https://github.com/wix/react-native-ui-lib/blob/master/demo/src/screens/componentScreens/MaskedInputScreen.js | ||
*/ | ||
function MaskedInput(props: MaskedInputProps, ref: ForwardedRef<any>) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've written this in the main PR area, they should make that more noticeable somehow...
Consider moving the screen to TS as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely. Fixed and also add a new cool example (:
Co-authored-by: Miki Leib <[email protected]>
Co-authored-by: Miki Leib <[email protected]>
<View row centerH> | ||
{_.times(4, i => { | ||
return ( | ||
<View marginR-s3 center style={styles.pinCodeSquare}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing key
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right, fixed!
<MaskedInput | ||
migrate | ||
maxLength={4} | ||
ref={this.priceInput} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should create a dedicated ref
, currently only one of the two users (price \ pin) are deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed as well (:
Description
Remove usage of legacy TextField from MaskedInput and migrate component to TS and function component
Changelog
Refactor MaskedInput component, remove legacy TextField usage