Skip to content
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

Conversation

ariellalgilmore
Copy link
Member

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, but it is actually necessary when the searchNoRedirect is used

Changelog

New

  • added back the onKeyDown function

@ariellalgilmore ariellalgilmore added the package: react Work necessary for the Carbon for IBM.com react components package label Mar 16, 2022
@ariellalgilmore ariellalgilmore requested a review from a team as a code owner March 16, 2022 18:32
@annawen1 annawen1 requested a review from emyarod March 16, 2022 19:09
@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Mar 16, 2022

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Mar 16, 2022

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Mar 16, 2022

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Mar 16, 2022

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Mar 16, 2022

Copy link
Member

@emyarod emyarod left a 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

Copy link
Contributor

@IgnacioBecerra IgnacioBecerra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @ariellalgilmore!

@ariellalgilmore ariellalgilmore added the Ready to merge Label for the pull requests that are ready to merge label Mar 16, 2022
@kodiakhq kodiakhq bot merged commit a176c21 into carbon-design-system:main Mar 16, 2022
@ariellalgilmore ariellalgilmore deleted the fix/masthead-search-react-enter branch March 16, 2022 21:19
kennylam pushed a commit to kennylam/carbon-for-ibm-dotcom that referenced this pull request Mar 17, 2022
…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)
kennylam pushed a commit to kennylam/carbon-for-ibm-dotcom that referenced this pull request Mar 17, 2022
…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)
kennylam pushed a commit to kennylam/carbon-for-ibm-dotcom that referenced this pull request Mar 17, 2022
…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)
kennylam added a commit that referenced this pull request Mar 17, 2022
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: react Work necessary for the Carbon for IBM.com react components package Ready to merge Label for the pull requests that are ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants