File tree Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -321,10 +321,10 @@ class DataGrid(DOMWidget):
321
321
index_name : str (default: "key")
322
322
String to specify the index column name. **Only set when the grid
323
323
is constructed and is not an observable traitlet**
324
- zebra_rows : bool (default: False)
325
- Enable "zebra striping" of the grid rows.
326
- zebra_columns : bool (default: False)
327
- Enable "zebra striping" of the grid columns.
324
+ horizontal_stripes : bool (default: False)
325
+ Enable themed coloring of alternate grid rows
326
+ vertical_stripes : bool (default: False)
327
+ Enable themed coloring of alternate grid columns
328
328
329
329
Accessors (not observable traitlets)
330
330
---------
@@ -416,8 +416,8 @@ class DataGrid(DOMWidget):
416
416
auto_fit_params = Dict (
417
417
{"area" : "all" , "padding" : 30 , "numCols" : None }, allow_none = False
418
418
).tag (sync = True )
419
- zebra_rows = Bool (False ).tag (sync = True )
420
- zebra_columns = Bool (False ).tag (sync = True )
419
+ horizontal_stripes = Bool (False ).tag (sync = True )
420
+ vertical_stripes = Bool (False ).tag (sync = True )
421
421
422
422
def __init__ (self , dataframe , index_name = None , ** kwargs ):
423
423
# Setting default index name if not explicitly
Original file line number Diff line number Diff line change @@ -122,8 +122,8 @@ export class DataGridModel extends DOMWidgetModel {
122
122
grid_style : { } ,
123
123
editable : false ,
124
124
column_widths : { } ,
125
- zebra_rows : false ,
126
- zebra_columns : false ,
125
+ horizontal_stripes : false ,
126
+ vertical_stripes : false ,
127
127
} ;
128
128
}
129
129
@@ -458,8 +458,8 @@ export class DataGridView extends DOMWidgetView {
458
458
} ) ;
459
459
460
460
const grid_style = this . model . get ( 'grid_style' ) ;
461
- if ( this . model . get ( 'zebra_rows ' ) || this . model . get ( 'zebra_columns ' ) ) {
462
- const index = this . model . get ( 'zebra_rows ' )
461
+ if ( this . model . get ( 'horizontal_stripes ' ) || this . model . get ( 'vertical_stripes ' ) ) {
462
+ const index = this . model . get ( 'horizontal_stripes ' )
463
463
? 'rowBackgroundColor'
464
464
: 'columnBackgroundColor' ;
465
465
grid_style [ index ] = ( index : number ) : string => {
@@ -796,8 +796,8 @@ export class DataGridView extends DOMWidgetView {
796
796
model : DataGridModel ;
797
797
backboneModel : DataGridModel ;
798
798
799
- zebra_rows : boolean ;
800
- zebra_columns : boolean ;
799
+ horizontal_stripes : boolean ;
800
+ vertical_stripes : boolean ;
801
801
802
802
// keep undefined since widget initializes before constructor
803
803
private _isLightTheme : boolean ;
You can’t perform that action at this time.
0 commit comments