Skip to content

Commit

Permalink
Keep focus on input when selecting from dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
felixhabib committed Apr 12, 2024
1 parent 1baefa6 commit 0968494
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ const TagOption = ({ tag, index, activeIndex }: TagOptionProps) => {
htmlFor={checkboxId}
className={styles.TagOpenLabel}
onClick={handleClick}
onMouseDown={(event) => event.preventDefault()}
>
<input
type="checkbox"
Expand Down Expand Up @@ -122,8 +123,7 @@ export const TagSelector = ({
onKeyDown={handleKeyDown}
/>
<span aria-hidden="true" data-trigger="multiselect" />
{/* Todo - remove !isFocussed */}
{(isFocussed || !isFocussed) && (
{isFocussed && (
<ul
className={styles.Dropdown}
id="available-tags"
Expand Down

0 comments on commit 0968494

Please sign in to comment.