Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tag editor to filter such values #3780

Merged
merged 2 commits into from
May 10, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions client/app/components/tags-control/EditTagsDialog.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { map, trim, uniq } from 'lodash';
import { map, trim, uniq, compact } from 'lodash';
import React from 'react';
import PropTypes from 'prop-types';
import Select from 'antd/lib/select';
Expand Down Expand Up @@ -30,7 +30,7 @@ class EditTagsDialog extends React.Component {
this.props.getAvailableTags().then((availableTags) => {
this.setState({
loading: false,
availableTags: uniq(map(availableTags, trim)),
availableTags: uniq(compact(map(availableTags, trim))),
});
});
}
Expand All @@ -50,7 +50,7 @@ class EditTagsDialog extends React.Component {
className="w-100"
placeholder="Add some tags..."
defaultValue={result}
onChange={values => this.setState({ result: map(values, trim) })}
onChange={values => this.setState({ result: compact(map(values, trim)) })}
autoFocus
disabled={loading}
loading={loading}
Expand Down