-
Notifications
You must be signed in to change notification settings - Fork 156
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
fix(masthead-search): react searchNoRedirect prop doesn't work on enter #8516
fix(masthead-search): react searchNoRedirect prop doesn't work on enter #8516
Conversation
Deploy preview created for package Built with commit: 52e974eb92e44118b401152cd2dcf3871773b96f |
Deploy preview created for package Built with commit: 52e974eb92e44118b401152cd2dcf3871773b96f |
Deploy preview created for package Built with commit: 52e974eb92e44118b401152cd2dcf3871773b96f |
Deploy preview created for package Built with commit: 52e974eb92e44118b401152cd2dcf3871773b96f |
Deploy preview created for package Built with commit: 52e974eb92e44118b401152cd2dcf3871773b96f |
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.
looks good to me! not sure if we want to include a break
and default case in the switch statement for best practices, but right now the switch is fine as is
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.
LGTM, thanks @ariellalgilmore!
…er (carbon-design-system#8516) ### Related Ticket(s) carbon-design-system#8334 ### Description people using the `searchNoRedirect` prop and press enter within the search box are still being redirected. The `onKeyDown` was removed in this [PR](carbon-design-system#7365), but it is actually necessary when the `searchNoRedirect` is used ### Changelog **New** - added back the `onKeyDown` function <!-- React and Web Component deploy previews are enabled by default. --> <!-- To enable additional available deploy previews, apply the following --> <!-- labels for the corresponding package: --> <!-- *** "test: e2e": Codesandbox examples and e2e integration tests --> <!-- *** "package: services": Services --> <!-- *** "package: utilities": Utilities --> <!-- *** "RTL": React / Web Components (RTL) --> <!-- *** "feature flag": React / Web Components (experimental) --> (cherry picked from commit a176c21)
…er (carbon-design-system#8516) ### Related Ticket(s) carbon-design-system#8334 ### Description people using the `searchNoRedirect` prop and press enter within the search box are still being redirected. The `onKeyDown` was removed in this [PR](carbon-design-system#7365), but it is actually necessary when the `searchNoRedirect` is used ### Changelog **New** - added back the `onKeyDown` function <!-- React and Web Component deploy previews are enabled by default. --> <!-- To enable additional available deploy previews, apply the following --> <!-- labels for the corresponding package: --> <!-- *** "test: e2e": Codesandbox examples and e2e integration tests --> <!-- *** "package: services": Services --> <!-- *** "package: utilities": Utilities --> <!-- *** "RTL": React / Web Components (RTL) --> <!-- *** "feature flag": React / Web Components (experimental) --> (cherry picked from commit a176c21)
…er (carbon-design-system#8516) ### Related Ticket(s) carbon-design-system#8334 ### Description people using the `searchNoRedirect` prop and press enter within the search box are still being redirected. The `onKeyDown` was removed in this [PR](carbon-design-system#7365), but it is actually necessary when the `searchNoRedirect` is used ### Changelog **New** - added back the `onKeyDown` function <!-- React and Web Component deploy previews are enabled by default. --> <!-- To enable additional available deploy previews, apply the following --> <!-- labels for the corresponding package: --> <!-- *** "test: e2e": Codesandbox examples and e2e integration tests --> <!-- *** "package: services": Services --> <!-- *** "package: utilities": Utilities --> <!-- *** "RTL": React / Web Components (RTL) --> <!-- *** "feature flag": React / Web Components (experimental) --> (cherry picked from commit a176c21)
…er (#8516) (#8541) ### Related Ticket(s) #8334 ### Description people using the `searchNoRedirect` prop and press enter within the search box are still being redirected. The `onKeyDown` was removed in this [PR](#7365), but it is actually necessary when the `searchNoRedirect` is used ### Changelog **New** - added back the `onKeyDown` function <!-- React and Web Component deploy previews are enabled by default. --> <!-- To enable additional available deploy previews, apply the following --> <!-- labels for the corresponding package: --> <!-- *** "test: e2e": Codesandbox examples and e2e integration tests --> <!-- *** "package: services": Services --> <!-- *** "package: utilities": Utilities --> <!-- *** "RTL": React / Web Components (RTL) --> <!-- *** "feature flag": React / Web Components (experimental) --> (cherry picked from commit a176c21) Co-authored-by: Ariella Gilmore <[email protected]>
Related Ticket(s)
#8334
Description
people using the
searchNoRedirect
prop and press enter within the search box are still being redirected. TheonKeyDown
was removed in this PR, but it is actually necessary when thesearchNoRedirect
is usedChangelog
New
onKeyDown
function