This commit is contained in:
yumoqing 2024-10-31 18:34:08 +08:00
parent 4231628a4a
commit 24cf16147d
2 changed files with 11 additions and 5 deletions

View File

@ -356,16 +356,22 @@ body {
overflow: auto;
}
.tabular-header-row {
background-color: #dddddd;
position: sticky;
display: flex;
top: 0;
position: sticky;
background-color: #dddddd;
min-width: 0;
min-width: fit-content;
flex-wrap: nowrap;
flex-shrink: 0;
}
.tabular-row {
display: flex;
margin-bottom: 5px;
min-width: 0;
min-width: fit-content;
flex-wrap: nowrap;
flex-shrink: 0;
margin-bottom: 5px;
}
.tabular-row:nth-child(odd) {
background-color: #5dfdfd;
@ -374,7 +380,7 @@ body {
background-color: #f9f9f9;
}
.tabular-row-selected {
background-color: #ef0000;
color: #ef0000;
}
.tabular-row-content {
padding: 2;

View File

@ -26,7 +26,6 @@ bricks.Tabular = class extends bricks.DataViewer {
return r;
}
var row = new bricks.VBox({
css:'tabular-row'
});
row.add_widget(r);
var content = new bricks.VBox({
@ -97,6 +96,7 @@ bricks.Tabular = class extends bricks.DataViewer {
header = false;
}
var dr = new bricks.DataRow(options);
dr.set_css('tabular-row');
dr.render(header);
dr.event_names.forEach(e => {
dr.toolbar_w.bind(e, this.record_event_handle.bind(this, e, record, dr));