Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Reactjs 已绑定到组件的函数仍显示未捕获类型错误的错误:\ this4.handleDeleteItem不是函数_Reactjs_Function_React Bootstrap Table - Fatal编程技术网

Reactjs 已绑定到组件的函数仍显示未捕获类型错误的错误:\ this4.handleDeleteItem不是函数

Reactjs 已绑定到组件的函数仍显示未捕获类型错误的错误:\ this4.handleDeleteItem不是函数,reactjs,function,react-bootstrap-table,Reactjs,Function,React Bootstrap Table,我已经在我的组件构造函数中绑定了该函数,但它仍然显示带有未捕获TypeError的错误:\u this4.handleDeleteItem不是函数。我正在使用react引导表2列格式化程序来编辑和删除按钮,我想从那里设置状态 return ( <div className="text-center"> <button type="button" className="btn btn-warning mr-1">

我已经在我的组件构造函数中绑定了该函数,但它仍然显示带有未捕获TypeError的错误:\u this4.handleDeleteItem不是函数。我正在使用react引导表2列格式化程序来编辑和删除按钮,我想从那里设置状态

       return (
          <div className="text-center">
              <button type="button" className="btn btn-warning mr-1">
                  <FontAwesomeIcon icon={ faEdit }/>
              </button>
              <button type="button" className="btn btn-danger" onClick={() => this.handleDeleteItem(row.id)}>
                  <FontAwesomeIcon icon={ faTrash }/>
              </button>
           </div>
            )
        }

请显示定义
handleDeleteItem
的位置。请显示定义
handleDeleteItem
的位置。
     this.setState({
         showModal: true,
         delItem: item_id
     });
   }