L
L
lexstile2021-07-23 12:20:45
React
lexstile, 2021-07-23 12:20:45

How to use InputMask with fields from other npm packages?

The problem is the following - I can not forward props - disabled.
Through a child element, forwarding gives an error - they say it is necessary through InputMask, but through InputMask, forwarding simply does not work.
I came across an issue where they say that they say it doesn’t work, but what then?
The code:

<FormItem top="Код сотрудника">
        <InputMask mask="999-999" maskChar=" " value={codeValue} disabled={loading} onChange={onChangeCodeValue}>
          {(inputProps) => (
            <Input {...inputProps} name="code" type="text" placeholder="Введите код в формате ХХХ-ХХХ" />
          )}
        </InputMask>
      </FormItem>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question