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: search box: pressing enter key clears text when clearable is true #427

Conversation

dkilgore-eightfold
Copy link
Contributor

SUMMARY:

Handle clear button keyboard event so it doesn't trigger by default. It now requires focus.

Also updates buttons to newer system ui button with transparency.

JIRA TASK (Eightfold Employees Only):

ENG-32974

CHANGE TYPE:

  • Bugfix Pull Request
  • Feature Pull Request

TEST COVERAGE:

  • Tests for this change already exist
  • I have added unittests for this change

TEST PLAN:

  • Pull the PR branch and run yarn and yarn storybook. Verify the SearchBox and TextInput stories behave as expected.
  • Open the ConfigProvider story and tab around to activate keyboard styles
  • Go to the SearchBox story and click on the SearchBox and type some text. Pressing enter should trigger a bunko search, not clear the text. Tabbing to the clear icon and pressing enter should clear the text.

Also updates to newer system ui button with transparency
@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 27, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 35ef21b:

Sandbox Source
React Configuration
Vanilla Configuration

@codecov-commenter
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (main@2fa465e). Click here to learn what that means.
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #427   +/-   ##
=======================================
  Coverage        ?   84.41%           
=======================================
  Files           ?      718           
  Lines           ?    15562           
  Branches        ?     5423           
=======================================
  Hits            ?    13137           
  Misses          ?     2357           
  Partials        ?       68           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@dkilgore-eightfold dkilgore-eightfold merged commit 498947c into EightfoldAI:main Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants