簡體   English   中英

材料表檢測行上的懸停

[英]Material-Table detect hover on row

我正在使用 React material-table ( https://material-table.com )。 我可以檢測到某行何時被懸停嗎?

我需要一些像onRowClick這樣的onRowClick但用於hover

<MaterialTable icons={{ Filter: () => 
    <SearchIcon className={classes.searchIcon} /> 
    }} columns={[ ... ]} data={this.props.data} options={{ ... }} 
    onRowClick={(event, rowData) => this.handleOpen(event, rowData)} 

我不確定我是否理解正確,但我認為您正在尋找onMouseEnter 您可以傳入自定義組件,即使是row的。 然后,您可以監聽它們的 mouseenter 事件。

https://material-table.com/#/docs/features/component-overriding

https://reactjs.org/docs/events.html#mouse-events

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM