A
A
Andrey2019-07-27 15:32:46
React
Andrey, 2019-07-27 15:32:46

How to insert value into react-input-mask?

I want to pass a substitution value to my form:

= react_component "PhoneInput/PhoneInput", {value: @user.phone, name: 'user[phone]'}


In my component:

const PhoneInput = ({ name, value }) => (
  <InputMask mask="+7 (999) 999 99 99" name={name} value={value} required className="input" />
);


The value is substituted, but I cannot edit or delete the substituted value.
How can I do that?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2019-07-27
@andreychumak

Where is the onChange handler? Why is it not? We must add.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question