EasyUI Forum
November 30, 2022, 09:33:09 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: DataList doens't seem to have a double click event?  (Read 1096 times)
chrwei
Full Member
***
Posts: 219


View Profile Email
« on: June 23, 2022, 01:57:13 PM »

How might I implement this?
Logged
jarry
Administrator
Hero Member
*****
Posts: 2140


View Profile Email
« Reply #1 on: June 27, 2022, 03:33:58 PM »

Please look at this example.

Code:
handleDoubleClick(row){
  console.log(row)
}
renderItem({ row }) {
  return (
    <div className="product f-row" onDoubleClick={this.handleDoubleClick.bind(this,row)}>
      <img src={this.getImage(row)} />
      <div className="detail">
        <p>{row.itemid} - {row.name}</p>
        <p>{row.attr}</p>
        <p>List Price: {row.listprice}</p>
      </div>
    </div>
  )
}
render() {
  return (
    <div>
      <DataList
        style={{ width: 550, height: 250 }}
        renderItem={this.renderItem.bind(this)}
        data={this.state.data}
        selectionMode="single"
        onSelectionChange={this.handleSelectionChange.bind(this)}
      />
    </div>
  );
}
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!