This repository has been archived by the owner on Dec 11, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 974
Bookmark manager style update #4658
Merged
Merged
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
eea84e5
Updates to about:bookmarks
bsclifton d7be320
Integrated with multi-select (had to make a few tweaks)
bsclifton b469473
Optimization for history page. Only one call per history date is made…
bsclifton bc63ccd
Bookmark manager no longer opens multiple tabs when double clicked
bsclifton 41a1087
The refactoring done in https://github.com/brave/browser-laptop/pull/…
bsclifton 3b730b9
Reworking about:bookmarks after feedback from Brad. Still some more t…
bsclifton File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,13 @@ class SortableTable extends ImmutableComponent { | |
return tableSort(this.table) | ||
} | ||
onClick (e) { | ||
const targetElement = e.target.parentNode | ||
// Work backwards until element is TR | ||
let targetElement = e.target | ||
while (targetElement) { | ||
if (targetElement.tagName === 'TR') break | ||
targetElement = targetElement.parentNode | ||
} | ||
if (!targetElement) return | ||
|
||
if (eventUtil.isForSecondaryAction(e)) { | ||
if (targetElement.className.includes(' selected')) { | ||
|
@@ -81,7 +87,12 @@ class SortableTable extends ImmutableComponent { | |
? (typeof this.props.totalRowObjects[parseInt(tableID)][index].toJS === 'function' | ||
? this.props.totalRowObjects[parseInt(tableID)][index].toJS() | ||
: this.props.totalRowObjects[parseInt(tableID)][index]) | ||
: null | ||
: (this.props.rowObjects.size > 0 || this.props.rowObjects.length > 0) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for taking care of non multi table selection. 👍 |
||
? (typeof this.props.rowObjects.toJS === 'function' | ||
? this.props.rowObjects.get(index).toJS() | ||
: this.props.rowObjects[index]) | ||
: null | ||
|
||
if (handlerInput) { | ||
handlerInputs.push(handlerInput) | ||
} | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice for parent traversing!!!