Skip to content

Commit

Permalink
isolate only for virtual
Browse files Browse the repository at this point in the history
  • Loading branch information
joduplessis committed Jun 13, 2024
1 parent be95235 commit 5bc2e2d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion packages/core/src/select/select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,17 @@ export const Select = (props: SelectProps) => {
onSelect(option, dismiss, clear)
// refocus the elment because the forced scrolling (useEffect)
// causes the element to lose focus
focusElementById(popupContentId)
if (as == 'virtual') {
if (isFilterable) {
if (tagInput) {
focusElement(tagInputFieldRef.current)
} else {
focusElementById(popupId)
}
} else {
focusElementById(popupContentId)
}
}
}

const handleClickOutside = (e) => {
Expand Down

0 comments on commit 5bc2e2d

Please sign in to comment.