diff options
author | bobzel <zzzman@gmail.com> | 2024-08-23 11:50:49 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2024-08-23 11:50:49 -0400 |
commit | dc7bb2ff07139c45efd3bf66ace0042b76c91ccf (patch) | |
tree | 38304ea860618de3759a40b4e086ea247389c74a /src/client/views/DocumentButtonBar.tsx | |
parent | add4926f62b397fc6c655be31a711dd7b83b469a (diff) |
modified keywordsBox to use tags instead data_labels. made text #tags trigger keywords box. made keywords box fit contents.
Diffstat (limited to 'src/client/views/DocumentButtonBar.tsx')
-rw-r--r-- | src/client/views/DocumentButtonBar.tsx | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/client/views/DocumentButtonBar.tsx b/src/client/views/DocumentButtonBar.tsx index d42a18e4e..eb157b9ab 100644 --- a/src/client/views/DocumentButtonBar.tsx +++ b/src/client/views/DocumentButtonBar.tsx @@ -282,15 +282,9 @@ export class DocumentButtonBar extends ObservableReactComponent<{ views: () => ( @computed get keywordButton() { - const targetDoc = this.view0?.Document; - return !targetDoc ? null : ( + return !DocumentView.Selected().length ? null : ( <Tooltip title={<div className="dash-keyword-button">Open keyword menu</div>}> - <div - className="documentButtonBar-icon" - style={{ color: 'white' }} - onClick={() => { - targetDoc[DocData].showLabels = !targetDoc[DocData].showLabels; - }}> + <div className="documentButtonBar-icon" style={{ color: 'white' }} onClick={() => DocumentView.Selected().map(dv => (dv.dataDoc.showLabels = !dv.dataDoc.showLabels))}> <FontAwesomeIcon className="documentdecorations-icon" icon="tag" /> </div> </Tooltip> |