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(module: input): add EventCallback OnClear #3020

Merged
merged 3 commits into from
Jan 17, 2023
Merged

feat(module: input): add EventCallback OnClear #3020

merged 3 commits into from
Jan 17, 2023

Conversation

Abin-Liu
Copy link
Contributor

add EventCallback OnClear to component Input as a parameter it is called when the input contents are cleared by clicking the clear icon

🤔 This is a ...

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

🔗 Related issue link

In some cases, we need to be notified when the user clears input contents by clicking the clear icon, for example if a keywork-searching was in effect, we need to reset the search results. But current there's no callback defined for this event.

💡 Background and solution

The solution is quite simple, just add an event callback into component Input, and invoke it when user clears the contents.

[Parameter] public EventCallback OnClear { get; set; }

📝 Changelog

Language Changelog
🇺🇸 English
🇨🇳 Chinese

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

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

add EventCallback OnClear to component Input<T> as a parameter
it is called when the input contents are cleared by clicking the clear icon
@github-actions
Copy link

github-actions bot commented Jan 17, 2023

@dnfadmin
Copy link

dnfadmin commented Jan 17, 2023

CLA assistant check
All CLA requirements met.

@ElderJames ElderJames merged commit 95a4628 into ant-design-blazor:master Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants