-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[select] popoverTargetProps and inputProps fixes & docs #5730
Conversation
[select] fix: unify & clarify popoverTargetProps supportPreviews: documentation | landing | table | demo |
fix up various docs & typedefsPreviews: documentation | landing | table | demo |
case "keydown": | ||
return event => { | ||
handler?.(event); | ||
this.props.popoverTargetProps?.onKeyDown?.(event); |
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 is a bugfix -- popoverTargetProps.onKey{Down|Up}
handlers were never getting called before.
@@ -252,6 +254,7 @@ export class Suggest2<T> extends AbstractPureComponent2<Suggest2Props<T>, Sugges | |||
{...inputProps} | |||
aria-autocomplete="list" | |||
aria-expanded={isOpen} | |||
className={classNames(targetProps.className, inputProps.className)} |
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 is also a bugfix -- inputProps.className
was clobbering targetProps.className
before, which would totally break things.
fix test compilationPreviews: documentation | landing | table | demo |
Changes proposed in this pull request:
popoverTargetProps
(prop available on Select2 and MultiSelect2) typedef & docs intoSelectPopoverProps
popoverTargetProps
is not supported on Suggest2, and users should useinputProps
instead, as it does the same thing.MultiSelect2
): invokepopoverTargetProps
onKeyDown
/oKeyUp
event handlers if providedchore(Suggest2
): clean up some code to make event handlers more legibleSuggest2
): fix support forinputProps.className
(it no longer overrides the popover class name, which caused all sorts of things to break)Reviewers should focus on:
No regressions (should be covered by test suites)