我遇到了一个问题react-final-form
,它告诉我我没有通过,type=checkbox
所以它无法正确解包。我有点困惑,因为在示例中自定义组件确实得到了type
传递给它。一个活生生的例子可以在下面找到:
https://codesandbox.io/s/9o227yp3q4
我看到的是输入以未定义状态开始,然后在用户输入时切换为真或假。从未定义的状态开始,我认为是导致问题的原因,但我并不积极。
我收到的错误消息是
Warning: You must pass `type="checkbox"` prop to your Field(attendees[0].isHost) component. Without it we don't know how to unpack your `value` prop - "undefined".