GithubHelp home page GithubHelp logo

shixiaoquan / react-native-sms-verifycode Goto Github PK

View Code? Open in Web Editor NEW
132.0 4.0 36.0 26.46 MB

A React Native component for filling in SMS verification codes or passwords, for android and iOS

JavaScript 79.66% Java 4.06% Objective-C 11.29% Starlark 4.99%
verifycode sms react-native

react-native-sms-verifycode's People

Contributors

szaboat avatar xch1029 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

react-native-sms-verifycode's Issues

格子宽度不跟随container自动计算

表现:设置外层containerStyle宽度为300,格子超出了显示范围

期望格子宽度可以基于外层容器宽度进行计算,而不是根据屏幕宽度

initialCodes 报错

一旦添加了,该属性就会报错,显示 initialCodes.filter is not a function 懒得去搞你的源码了。。。。换一个,再试试,着急赶项目

Autofill code

Hello!
I'm trying to autofill code on boxes, there is a way to do this? (Passing initial value to component)

the keyboard and password box can not appear at the same time

When I use SMSVerifyCode, the keyboard and password box can not appear at the same time, must click the password box to appear the keyboard, I think the keyboard and password box will appear at the same time, the user experience will be better

在onInputCompleted调用reset()方法无法清除内容

需求:在验证码输入完毕之后发起请求,校验不通过则清除输入的验证码内容。
问题:好像跟请求的响应速度有关系,如响应快的话,内容不会被清空、或者清空了一瞬再恢复。,响应慢的话,内容被清空没有存在问题。
看了源代码,建议作者可以去掉延时方法。将onInputCompleted()写入this.setState()的回调中,则不会再出现这个问题。

_80e64e81-25aa-4cba-adab-db3addfd82d1
@shixiaoquan

每个输入框margin自己设置

你好,我想问一下,我看你的代码写的应该是每个输入框之间的margin距离是自动计算的,这样会导致我无法自己设置每个的间距,并且再更改codeViewWidth之后样式会乱掉,给containerStyle设置justifyContent的任何值都是一个效果。
能否不去计算并且设置margin的值从而我自己使用justifyContent去控制距离 目前
image

image

关于输入框间距

margin设定了无效果啊,亲,因为大部分RN项目都有自己container,直接拿screen的宽带有点不友善啊。这个要在哪里改呢,提示一下下?

建议onInputCompleted 改为 onInputChangeText

会存在可能,在验证码先输入完整,然后再删除掉一位(或者多位) 此时界面上的是没有输入完的验证码 而 或得到的验证码已经是输入完了的 此时点击下一步按钮会 通过前端的验证码验证

Android 11 code can't be entered

Keyboard is showing up but code view doesn't reflect to any numbers entered...
Small investigation get me to the issue with hidden TextInput, once I remove width=0, height=0 from its styles everything start work just fine.

验证码框可选是否页面打开获得焦点

你好,我发现目前的是页面刚打开就会自动获得焦点, 作为建议是否可以设置页面打开的时候是否获得焦点 类似我这种需求是不需要页面刚打开的时候focus的
image

定时器未清除

源码里

 this.setState(
            {
              text,
              codeArray,
              coverBGColorList: this.getBeforeCoverBGColorList(codeArray, verifyCodeLength),
            },
            () => {
              this.timeout = setTimeout(
                () => this.setState({
                  codeArray,
                  coverBGColorList: this.getCoverBGColorList(codeArray, verifyCodeLength),
                }),
                500,
              );
            },
          );

虽然不知道这条代码是什么意思,但是里面设置了一个定时器,却未在WIllUnmount里清除,某些情况会出现问题

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.