Skip to content

Commit

Permalink
fix: used auto focus prop
Browse files Browse the repository at this point in the history
  • Loading branch information
vikrantgupta25 committed Dec 16, 2024
1 parent fece584 commit 7f7a532
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -838,14 +838,6 @@ function QueryBuilderSearchV2(
[tags],
);

useEffect(() => {
// this is required because on change of query tags the Select component re-renders which looses focus.
// this was added because Select component was acting inconsistently for similar tags
if (selectRef.current && queryTags.length > 0 && isOpen) {
selectRef.current?.focus();
}
}, [queryTags, isOpen]);

const onTagRender = ({
value,
closable,
Expand Down Expand Up @@ -912,6 +904,7 @@ function QueryBuilderSearchV2(
transitionName=""
choiceTransitionName=""
filterOption={false}
autoFocus={isOpen}
open={isOpen}
suffixIcon={
// eslint-disable-next-line no-nested-ternary
Expand Down

0 comments on commit 7f7a532

Please sign in to comment.