Skip to content

Commit

Permalink
bug fix with tag delete on search form
Browse files Browse the repository at this point in the history
  • Loading branch information
ramory-l committed Jan 5, 2021
1 parent 54a1664 commit 6c877f0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/components/searchForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class SearchForm extends Form {
.label("Age From"),
age_confirm: Joi.number().required().max(90).label("Age To"),
radius: Joi.number().optional().min(0).empty("").label("Radius"),
tags: Joi.string().optional().label("Tags"),
tags: Joi.string().optional().empty("").label("Tags"),
});

handleTags = (tags) => {
Expand Down
1 change: 1 addition & 0 deletions frontend/src/components/tagsInput.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const TagsInput = ({ userId, editMode, isSearchForm, onHandleTags }) => {
const handleDelete = async (i) => {
const newTags = tags.slice(0);
const tag = newTags.splice(i, 1);
if (!tag[0]) return;
await deleteTag(tag[0].name);
if (isSearchForm) {
const tagsStr = newTags
Expand Down

0 comments on commit 6c877f0

Please sign in to comment.