Skip to content

TagSpaces is an offline, open source, document manager with tagging support

fixing autosggest dialog

Ilian Sapundshiev3a545efa03c4
diff --git a/app/components/TagAutoSuggestion.js b/app/components/TagAutoSuggestion.js
index 8ead80701..287c7dbad 100644
--- a/app/components/TagAutoSuggestion.js
+++ b/app/components/TagAutoSuggestion.js
@@ -21,8 +21,7 @@ import React from 'react';
import Button from 'material-ui/Button';
import TextField from 'material-ui/TextField';
import Autosuggest from 'react-autosuggest';
-import match from 'autosuggest-highlight/match';
-import parse from 'autosuggest-highlight/parse';
+// import parse from 'autosuggest-highlight/umd/parse';
import Paper from 'material-ui/Paper';
import uuidv1 from 'uuid';
import { withStyles } from 'material-ui/styles';
@@ -53,8 +52,7 @@ function renderInput(inputProps) {
}
function renderSuggestion(suggestion, { query, isHighlighted }) {
- const matches = match(suggestion.title, query);
- const parts = parse(suggestion.title, matches);
+ const parts = []; // parse(suggestion.title, matches);
return (
<MenuItem selected={isHighlighted} component="div">
<div>
@@ -219,7 +217,7 @@ class TagAutoSuggestion extends React.Component<Props, State> {
return (
<div>
<FormControl fullWidth={true}>
- <Autosuggest
+ { /*<Autosuggest
theme={{
container: this.props.classes.container,
suggestionsContainerOpen: this.props.classes.suggestionsContainerOpen,
@@ -241,7 +239,7 @@ class TagAutoSuggestion extends React.Component<Props, State> {
value: this.state.value,
onChange: this.handleTagSearchChange,
}}
- />
+ /> */ }
<ListItemSecondaryAction className={this.props.classes.alignAddButton}>
<Button
data-tid="addTag"
diff --git a/app/perspectives/grid-perspective/src/index.js b/app/perspectives/grid-perspective/src/index.js
index 9638f7fb1..11833b332 100644
--- a/app/perspectives/grid-perspective/src/index.js
+++ b/app/perspectives/grid-perspective/src/index.js
@@ -976,7 +976,7 @@ class GridPerspective extends React.Component<Props, State> {
</div>
</div>
<AddRemoveTagsDialog
- selectedItem={this.props.selectedItem}
+ selectedItem={this.state.selectedItem}
open={this.state.isAddRemoveTagsDialogOpened}
onClose={this.handleCloseDialogs}
selectedEntries={this.props.selectedEntries}