Skip to content

Commit

Permalink
fix(data-grid): hover style
Browse files Browse the repository at this point in the history
  • Loading branch information
surunzi committed Nov 15, 2024
1 parent c804b8b commit 82c8c3f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/data-grid/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,7 @@ export class DataGridNode {
this.data = data
if (options.selectable) {
this.selectable = options.selectable
this.$container.addClass(dataGrid.c('selectable'))
}

this.render()
Expand Down
20 changes: 11 additions & 9 deletions src/data-grid/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@
background: theme.$color-fill-secondary;
position: relative;
&.sortable {
padding-right: theme.$padding-s-m;
padding-right: #{theme.$padding-s-m}px;
&:hover,
&:active {
background: #e6e6e6;
background: theme.$color-fill;
}
}
.icon-caret-down,
Expand All @@ -61,15 +61,15 @@
}

&:focus {
.node.selected {
.node.selectable.selected {
color: #fff;
background: #1a73e8;
background: theme.$color-primary;
}
}

&:focus.theme-dark {
.node.selected {
background: #0e639c;
.node.selectable.selected {
background: theme.$color-primary-dark;
}
}
}
Expand All @@ -85,7 +85,8 @@

.data-container {
overflow-y: auto;
.node.selected {
.node.selected,
.node.selectable:hover {
background: #ddd;
}
tr:nth-child(even) {
Expand Down Expand Up @@ -126,12 +127,13 @@
background: theme.$color-fill-secondary-dark;
&.sortable {
&:hover {
background: #303030;
background: theme.$color-fill-dark;
}
}
}
.data-container {
.node.selected {
.node.selected,
.node.selectable:hover {
background: #393939;
}
tr:nth-child(even) {
Expand Down

0 comments on commit 82c8c3f

Please sign in to comment.