Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

react-data-table-component cell action stack overflow

const columns =  [
  {
    cell:(row) => <button onClick={this.clickHandler} id={row.ID}>Action</button>,
    ignoreRowClick: true,
    allowOverflow: true,
    button: true,
  },
  {
    name: 'ID',
    selector: 'ID',
    sortable: true,
    grow: 2,
  },
  {
    name: 'Name',
    selector: 'name',
    sortable: true,
    grow: 2,
  }
  ]
  
   clickHandler = (state) => {
    debugger;
    console.log(state.target.id);
  };
 
PREVIOUS NEXT
Tagged: #cell #action #stack #overflow
ADD COMMENT
Topic
Name
9+5 =