1
私は、デフォルト値を持つ "readOnly"ボックスを含むreduxフォームを使用してフィールドを作成します。Reduxフォームの入力フィールドに値を設定
だから、イム書き込み
<Field id="current-password"
name="current-password"
type="text"
readOnly="readOnly"
component={inputField}>
value={userNumber}
</Field>
userNumberは小道具です。 入力フィールドがある:私のコンポーネントは、私はそれがこのように表示させたい場合は、レンダリング
: 私
mport React from 'react';
import { Input } from 'reactstrap';
export default field => (
<div>
<Input {...field.input} type={field.type}>
{field.children}
</Input>
{field.meta.touched && field.meta.error &&
<span className="error">{field.meta.error}</span>}
</div>
);
私のレイアウトは、このようなものです。問題は、「値」小道具が割り当てられていないことです。 これを解決するには?
誰もここにあります? – user7334203