Steve
  • 0
  • 新人请关照

antd getCheckboxProps中使用defaultChecked报错

groupRowSelection:any={

    type:'checkbox',

    onChange:(id:any,list:any)=>{

    this.setState({
        ...this.state,
       memberGroupIds: id,
        isChange:true,
    });

},

getCheckboxProps:(record:any)=>({
      defaultChecked: record.isBind ==true,
    }),

};

结果报错:

Warning: [antd: Table] Do not set `checked` or `defaultChecked` in `getCheckboxProps`. Please use `selectedRowKeys` instead. 
    in LocaleReceiver

好像说用selectedRowKeys,用这个怎么解决呢

阅读 301
评论 3月31日提问
    撰写回答

    登录后参与交流、获取后续更新提醒