Skip to content

Commit

Permalink
Fix sortableTable hover effect and searchTab onClick
Browse files Browse the repository at this point in the history
fix brave#4099

Auditors: @bbondy

Test Plan:

1. Go to "about:preferences#search"
2. There should be hover effect when hovering on row
3. Should be able to swtch default search engine
  • Loading branch information
darkdh committed Sep 19, 2016
1 parent 5330ee7 commit 4ed8adb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion js/about/preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ class SearchTab extends ImmutableComponent {
}

hoverCallback (rows) {
this.props.onChangeSetting(settings.DEFAULT_SEARCH_ENGINE, rows[1].props.children.props.name)
this.props.onChangeSetting(settings.DEFAULT_SEARCH_ENGINE, rows[1].value)
}

render () {
Expand Down
3 changes: 2 additions & 1 deletion js/components/sortableTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ class SortableTable extends ImmutableComponent {
const rowAttributes = this.getRowAttributes(row, i)
return <tr {...rowAttributes}
data-context-menu-disable={rowAttributes.onContextMenu ? true : undefined}
className={this.hasRowClassNames ? this.props.rowClassNames[i] : undefined}>{entry}</tr>
className={this.hasRowClassNames ? this.props.rowClassNames[i] + ' ' + rowAttributes.className
: rowAttributes.className}>{entry}</tr>
})
}
</tbody>
Expand Down

0 comments on commit 4ed8adb

Please sign in to comment.