元素未显示在反应制表器中

时间:2021-05-14 07:35:58

标签: reactjs react-redux tabulator

我是 React 的新手,也是制表机的新手。

我正在尝试在表格中单击图像的单元格时显示标题。我的制表符代码如下所示:

      { title: "Type", field: "type", minWidth : 100, headerSort: false,headerFilter: "input", 
      headerFilterPlaceholder:"search...",visible:true},
      { title: "ID", field: "id", minWidth : 100, headerSort: false,headerFilter: "input", 
       headerFilterPlaceholder:"search...",visible:true},
      { title: "Description", field: "desc", minWidth : 100, headerSort: false,headerFilter: "input", 
      headerFilterPlaceholder:"search...",
      editor: "number", editorParams: {allowEmpty: false},cellEdited:this.updateTableData,  
       validator:{type:"max", parameters:99999999 },visible:true},
      **{ title: "ImageURL", field: "imgurl", minWidth : 100, headerSort: false,headerFilter: 
       "input", 
       headerFilterPlaceholder:"search...",
       editorParams: {allowEmpty: false},cellEdited:this.updateTableData , validator:{type:"max", 
       parameters:99999999 },visible:true,formatter:"image", formatterParams:{height:"50px",
       width:"50px",
       urlPrefix:"http://website.com/images/",
       urlSuffix:".png",
   },cellClick:function(e, cell){
    ImageExpand();
}},**
      { title: "Active", field: "active", minWidth : 100, headerSort: false,headerFilter: "input", 
       headerFilterPlaceholder:"search...",
      editor: "number", editorParams: {allowEmpty: false},cellEdited:this.updateTableData , 
      validator:{type:"max", parameters:99999999 },visible:true}

我试图在单击单元格时在粗体部分显示保存。然而,它并没有这样做。

我应该向它添加一个函数还是我应该如何做才能在单击单元格时显示保存标题

这是我的图像扩展功能:

function ImageExpand() {      
  return (  
    <div>
    <h1>Save</h1>
    </div>
);
  }

0 个答案:

没有答案