-
Hello I am trying to gain access to the filtered results when a user starts typing into the search bar. Example, if I start typing |
Beta Was this translation helpful? Give feedback.
Answered by
Rall3n
Sep 13, 2021
Replies: 1 comment 2 replies
-
Hello @hermbo, the const MySelect = () => {
const selectRef = useRef(null);
// Use selectRef.select.getFocusableOptions() to access options.
return <Select ref={selectRef} />;
} |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
hermbo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello @hermbo,
the
Select
component has a method calledgetFocusableOptions
which returns all options which are currently visible inside the list.Be aware that the function only returns the options if the menu is open.