fix: tag input auto-submitting when pressing space (#1608)

This commit is contained in:
Aman Harwara
2022-09-21 20:39:29 +05:30
committed by GitHub
parent ee0d44405d
commit 581a08cd09
2 changed files with 6 additions and 2 deletions

View File

@@ -112,6 +112,8 @@ const SmartViewsListItem: FunctionComponent<Props> = ({ view, tagsState }) => {
return (
<>
<div
role="button"
tabIndex={0}
className={classNames('tag py-2 px-3.5 md:py-1', isSelected && 'selected', isFaded && 'opacity-50')}
onClick={selectCurrentTag}
style={{

View File

@@ -202,7 +202,9 @@ export const TagsListItem: FunctionComponent<Props> = observer(({ tag, features,
return (
<>
<button
<div
role="button"
tabIndex={0}
className={classNames(
'tag py-2 px-3.5 focus:shadow-inner md:py-1',
isSelected && 'selected',
@@ -272,7 +274,7 @@ export const TagsListItem: FunctionComponent<Props> = observer(({ tag, features,
<div className={`meta ${hasAtLeastOneFolder ? 'with-folders' : ''}`}>
{tag.conflictOf && <div className="danger text-[0.625rem] font-bold">Conflicted Copy {tag.conflictOf}</div>}
</div>
</button>
</div>
{isAddingSubtag && (
<div
className="tag overflow-hidden"