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

feat(Search): added disable button for Search Input #46254

Closed
wants to merge 1 commit into from

Conversation

bfgelectronics
Copy link

[中文版模板 / Chinese template]

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Internationalization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Workflow
  • Other (about what?)

🔗 Related issue link

💡 Background and solution

Added the ability to disable the Enter Button on Search Input.

image
image

📝 Changelog

Added the disableEnterButton propriety that allows the enter button to be disabled.
Updated the tests + documentation + demo to show this change.

Language Changelog
🇺🇸 English Added disableEnterButton prop for Search Input
🇨🇳 Chinese 为搜索输入添加了 disableEnterButton 命题

☑️ Self-Check before Merge

⚠️ Please check all items below before requesting a reviewing. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

Copy link

stackblitz bot commented Dec 4, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link
Contributor

github-actions bot commented Dec 4, 2023

Preview Is ready

Copy link

codesandbox-ci bot commented Dec 4, 2023

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 47f794c:

Sandbox Source
antd reproduction template (forked) Configuration

Copy link

codecov bot commented Dec 4, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e191962) 100.00% compared to head (47f794c) 100.00%.
Report is 1 commits behind head on feature.

Additional details and impacted files
@@            Coverage Diff            @@
##           feature    #46254   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          708       708           
  Lines        12108     12110    +2     
  Branches      3211      3213    +2     
=========================================
+ Hits         12108     12110    +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -107,6 +107,7 @@ The rest of the props of `Input.TextArea` are the same as the original [textarea
| Property | Description | Type | Default |
| --- | --- | --- | --- |
| enterButton | Whether to show an enter button after input. This property conflicts with the `addonAfter` property | boolean \| ReactNode | false |
Copy link
Member

Choose a reason for hiding this comment

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

enterButton={<Button disabled>submit</Button>}

Is it enough?

Copy link
Author

Choose a reason for hiding this comment

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

That could also work but it i think it would be nice to be able to control the already made button.
Or instead of my feature, should i create a new proprety (like buttonProps) that could send props directly to the Button?

Copy link
Member

Choose a reason for hiding this comment

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

enterButton accept a ReactNode like <Button /> so that we can prevent another enterButtonProps.

Copy link
Member

@afc163 afc163 Dec 6, 2023

Choose a reason for hiding this comment

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

Same as disabledEnterButton, that is what we don't wanna see.

Copy link
Author

Choose a reason for hiding this comment

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

Ok then , i guess that this PR can be closed

@afc163 afc163 closed this Dec 6, 2023
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.

None yet

2 participants