-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lib: Remove custom key navigation from TypeaheadSelect #21412
Conversation
The TypeaheadSelect template code will focus the text input 100ms after opening the menu. The tests generally aren't disturbed about that, except when simulating key presses, of course. When the focus unexpectedly shifts back to the text input while navigating the menu items, the focused item is reset to either the first or last one.
It's not helping.
6f2f191
to
20b87ec
Compare
function add(val: string | number) { | ||
setSelected(selected.concat([val])); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These 2 added lines are not executed by any test.
function rem(val: string | number) { | ||
setSelected(selected.filter(v => v != val)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These 2 added lines are not executed by any test.
id='multi-typeahead-widget' | ||
placeholder="Select flavors" | ||
isScrollable | ||
noOptionsFoundMessage={notFoundIsString ? "Not found" : val => cockpit.format("'$0' not found", val) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This added line is not executed by any test.
onToggle={() => setToggles(val => val + 1)} | ||
onInputChange={() => setChanges(val => val + 1)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These 2 added lines are not executed by any test.
id="notFoundIsStringMulti" | ||
label="notFoundIsString" | ||
isChecked={notFoundIsString} | ||
onChange={(_event, checked) => setNotFoundIsString(checked)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This added line is not executed by any test.
This only works with the PF coming in #21399. Before that, the text input keeps its focus and the template does indeed handle all key presses for the menu navigation. |
It's not helping.