diff options
author | Sam Wilkins <35748010+samwilkins333@users.noreply.github.com> | 2019-07-27 16:49:07 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-27 16:49:07 -0400 |
commit | 6c94ca5149c5d1c4b4bd90b1326560565df8117f (patch) | |
tree | 060976e1ed80f97f90ad83a4b1821b79046b786d /src/client/views/ContextMenu.tsx | |
parent | 7f8281ca3b6fdbda7dae624bcad307d3ccdcac7b (diff) | |
parent | a75494ad339b656242dab033f86cbeb13dc882b8 (diff) |
Merge pull request #217 from browngraphicslab/context_menu
Context menu UI overhaul and added undo to linking via dragging and a few smaller functions
Diffstat (limited to 'src/client/views/ContextMenu.tsx')
-rw-r--r-- | src/client/views/ContextMenu.tsx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/client/views/ContextMenu.tsx b/src/client/views/ContextMenu.tsx index c163c56a0..a608e448a 100644 --- a/src/client/views/ContextMenu.tsx +++ b/src/client/views/ContextMenu.tsx @@ -38,6 +38,10 @@ export class ContextMenu extends React.Component { this._items = []; } + findByDescription = (target: string) => { + return this._items.find(menuItem => menuItem.description === target); + } + @action addItem(item: ContextMenuProps) { if (this._items.indexOf(item) === -1) { @@ -165,11 +169,11 @@ export class ContextMenu extends React.Component { const contents = ( <> - <span> + <span className={"search-icon"}> <span className="icon-background"> <FontAwesomeIcon icon="search" size="lg" /> </span> - <input className="contextMenu-item contextMenu-description" type="text" placeholder="Search . . ." value={this._searchString} onKeyDown={this.onKeyDown} onChange={this.onChange} autoFocus /> + <input className="contextMenu-item contextMenu-description search" type="text" placeholder="Search . . ." value={this._searchString} onKeyDown={this.onKeyDown} onChange={this.onChange} autoFocus /> </span> {this.menuItems} </> |