Skip to content

Commit 4ba0b14

Browse files
committed
rename 'zebra' -> horizontal/vertical
Signed-off-by: tfmark <[email protected]>
1 parent ee65ab5 commit 4ba0b14

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

ipydatagrid/datagrid.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -321,10 +321,10 @@ class DataGrid(DOMWidget):
321321
index_name : str (default: "key")
322322
String to specify the index column name. **Only set when the grid
323323
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
328328
329329
Accessors (not observable traitlets)
330330
---------
@@ -416,8 +416,8 @@ class DataGrid(DOMWidget):
416416
auto_fit_params = Dict(
417417
{"area": "all", "padding": 30, "numCols": None}, allow_none=False
418418
).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)
421421

422422
def __init__(self, dataframe, index_name=None, **kwargs):
423423
# Setting default index name if not explicitly

js/datagrid.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ export class DataGridModel extends DOMWidgetModel {
122122
grid_style: {},
123123
editable: false,
124124
column_widths: {},
125-
zebra_rows: false,
126-
zebra_columns: false,
125+
horizontal_stripes: false,
126+
vertical_stripes: false,
127127
};
128128
}
129129

@@ -458,8 +458,8 @@ export class DataGridView extends DOMWidgetView {
458458
});
459459

460460
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')
463463
? 'rowBackgroundColor'
464464
: 'columnBackgroundColor';
465465
grid_style[index] = (index: number): string => {
@@ -796,8 +796,8 @@ export class DataGridView extends DOMWidgetView {
796796
model: DataGridModel;
797797
backboneModel: DataGridModel;
798798

799-
zebra_rows: boolean;
800-
zebra_columns: boolean;
799+
horizontal_stripes: boolean;
800+
vertical_stripes: boolean;
801801

802802
// keep undefined since widget initializes before constructor
803803
private _isLightTheme: boolean;

0 commit comments

Comments
 (0)