File tree Expand file tree Collapse file tree 3 files changed +39
-0
lines changed Expand file tree Collapse file tree 3 files changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -321,6 +321,21 @@ var FixedDataTable = createReactClass({
321
321
*/
322
322
onRowMouseLeave : PropTypes . func ,
323
323
324
+ /**
325
+ * Callback that is called when a touch-start event happens on a row.
326
+ */
327
+ onRowTouchStart : PropTypes . func ,
328
+
329
+ /**
330
+ * Callback that is called when a touch-end event happens on a row.
331
+ */
332
+ onRowTouchEnd : PropTypes . func ,
333
+
334
+ /**
335
+ * Callback that is called when a touch-move event happens on a row.
336
+ */
337
+ onRowTouchMove : PropTypes . func ,
338
+
324
339
/**
325
340
* Callback that is called when resizer has been released
326
341
* and column needs to be updated.
@@ -732,6 +747,9 @@ var FixedDataTable = createReactClass({
732
747
onRowMouseUp = { state . onRowMouseUp }
733
748
onRowMouseEnter = { state . onRowMouseEnter }
734
749
onRowMouseLeave = { state . onRowMouseLeave }
750
+ onRowTouchStart = { state . touchScrollEnabled ? state . onRowTouchStart : null }
751
+ onRowTouchEnd = { state . touchScrollEnabled ? state . onRowTouchEnd : null }
752
+ onRowTouchMove = { state . touchScrollEnabled ? state . onRowTouchMove : null }
735
753
rowClassNameGetter = { state . rowClassNameGetter }
736
754
rowsCount = { state . rowsCount }
737
755
rowGetter = { state . rowGetter }
Original file line number Diff line number Diff line change @@ -38,6 +38,9 @@ var FixedDataTableBufferedRows = createReactClass({
38
38
onRowMouseUp : PropTypes . func ,
39
39
onRowMouseEnter : PropTypes . func ,
40
40
onRowMouseLeave : PropTypes . func ,
41
+ onRowTouchStart : PropTypes . func ,
42
+ onRowTouchEnd : PropTypes . func ,
43
+ onRowTouchMove : PropTypes . func ,
41
44
rowClassNameGetter : PropTypes . func ,
42
45
rowsCount : PropTypes . number . isRequired ,
43
46
rowHeightGetter : PropTypes . func ,
@@ -174,6 +177,9 @@ var FixedDataTableBufferedRows = createReactClass({
174
177
onMouseUp = { props . onRowMouseUp }
175
178
onMouseEnter = { props . onRowMouseEnter }
176
179
onMouseLeave = { props . onRowMouseLeave }
180
+ onTouchStart = { props . onRowTouchStart }
181
+ onTouchEnd = { props . onRowTouchEnd }
182
+ onTouchMove = { props . onRowTouchMove }
177
183
className = { joinClasses (
178
184
rowClassNameGetter ( rowIndex ) ,
179
185
cx ( 'public/fixedDataTable/bodyRow' ) ,
Original file line number Diff line number Diff line change @@ -191,6 +191,9 @@ class FixedDataTableRowImpl extends React.Component {
191
191
onMouseUp = { this . props . onMouseUp ? this . _onMouseUp : null }
192
192
onMouseEnter = { this . props . onMouseEnter ? this . _onMouseEnter : null }
193
193
onMouseLeave = { this . props . onMouseLeave ? this . _onMouseLeave : null }
194
+ onTouchStart = { this . props . onTouchStart ? this . _onTouchStart : null }
195
+ onTouchEnd = { this . props . onTouchEnd ? this . _onTouchEnd : null }
196
+ onTouchMove = { this . props . onTouchMove ? this . _onTouchMove : null }
194
197
style = { style } >
195
198
< div className = { cx ( 'fixedDataTableRowLayout/body' ) } >
196
199
{ fixedColumns }
@@ -286,6 +289,18 @@ class FixedDataTableRowImpl extends React.Component {
286
289
_onMouseLeave = ( /*object*/ event ) => {
287
290
this . props . onMouseLeave ( event , this . props . index ) ;
288
291
} ;
292
+
293
+ _onTouchStart = ( /*object*/ event ) => {
294
+ this . props . onTouchStart ( event , this . props . index ) ;
295
+ } ;
296
+
297
+ _onTouchEnd = ( /*object*/ event ) => {
298
+ this . props . onTouchEnd ( event , this . props . index ) ;
299
+ } ;
300
+
301
+ _onTouchMove = ( /*object*/ event ) => {
302
+ this . props . onTouchMove ( event , this . props . index ) ;
303
+ } ;
289
304
}
290
305
291
306
class FixedDataTableRow extends React . Component {
You can’t perform that action at this time.
0 commit comments