简体   繁体   中英

React Typescript: Antd Checkbox value not working

Hello im trying to fill the Checkbox value with my state but it dont accept it.

The Checkbox Code:

<Form.Item label="Aktiv" >
    <Checkbox value={this.state.selectedRecord.active} />
</Form.Item>

Value of the state selectedRecord: 在此处输入图像描述

try changing it to this.

 <Checkbox checked={this.state.selectedRecord.active} />

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM