File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
packages/devextreme/js/__internal/grids/grid_core/__tests__/__mock__/model Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ import type { GridBase } from '@js/common/grids';
44import type { dxElementWrapper } from '@js/core/renderer' ;
55import $ from '@js/core/renderer' ;
66
7+ import { DataRowModel } from './row/data_row' ;
8+
79const SELECTORS = {
810 headerRowClass : 'dx-header-row' ,
911 dataRowClass : 'dx-data-row' ,
@@ -45,5 +47,13 @@ export abstract class GridCoreModel<TInstance extends GridBase = GridBase> {
4547 return $ ( Array . from ( this . getHeaderCells ( ) ) . find ( ( el ) => $ ( el ) . text ( ) . includes ( text ) ) ) ;
4648 }
4749
50+ public getDataRows ( ) : NodeListOf < HTMLElement > {
51+ return this . root . querySelectorAll ( `.${ SELECTORS . dataRowClass } ` ) ;
52+ }
53+
54+ public getDataRow ( rowIndex : number ) : DataRowModel {
55+ return new DataRowModel ( this . getDataRows ( ) [ rowIndex ] ) ;
56+ }
57+
4858 public abstract getInstance ( ) : TInstance ;
4959}
You can’t perform that action at this time.
0 commit comments