react-code-input icon indicating copy to clipboard operation
react-code-input copied to clipboard

handle paste in ReactCodeInput component

Open mahdij98 opened this issue 2 years ago • 1 comments

when im trying to paste a number it will paste it in the first box only :

import ReactCodeInput from "react-code-input";
<ReactCodeInput
                  inputStyle={{
                    fontFamily: "iranYekan",
                    margin: "6px",
                    MozAppearance: "textfield",
                    textAlign: "center",
                    borderRadius: "6px",
                    fontSize: "20px",
                    backgroundColor: "#E2E4F3",
                    color: "#000",
                    border: "none",
                    padding: "4px",
                    outlineColor: "#7067ff",
                  }}
                  inputStyleInvalid={{
                    fontFamily: "iranYekan",
                    margin: "4px",
                    MozAppearance: "textfield",
                    width: "15px",
                    borderRadius: "6px",
                    fontSize: "14px",
                    height: "26px",
                    padding: "4px",
                    backgroundColor: "black",
                    color: "red",
                    border: "1px solid red",
                  }}
                  name={""}
                  inputMode={"tel"}
                  type="number"
                  fields={5}
                  // {...codeInputProps}
                  onChange={(value: any) => {
                    setCodeValue(value);
                    setEmailErros("");
                  }}
                  value={codeValue}
                />
            my version is 8.19.2

mahdij98 avatar Jul 24 '23 05:07 mahdij98

Please explain your issue more clearly so I can understand it better.

Please provide an example of the bug, maybe using something like codepen.

I'll do my best to help you! 🙂

srsholmes avatar Jul 24 '23 19:07 srsholmes