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(onBlur): 移除 onBlur 时添加 option 以及收起面板等默认行为 #953

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

vaynevayne
Copy link

No description provided.

@vercel
Copy link

vercel bot commented Jun 12, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
select ❌ Failed (Inspect) Jun 19, 2023 10:48am

@vaynevayne
Copy link
Author

vaynevayne commented Jun 12, 2023

原来的逻辑:
input onBlur 时,就会收起面板,
tags 模式下:
input onBlur 时 不做任何操作
面板onBlur 时, 清空搜索值并且添加选项

新逻辑:
input onBlur 时,不收起面板
面板onBlur 时, 收起面板
tags 模式下,
input onBlur 时 不做任何操作
面板onBlur 时, 清空搜索值 不添加选项
ps: 如果需要onBlur 时添加选项, 需要用户使用受控模式自行添加

@vaynevayne vaynevayne changed the title feat(onBlur): remove custom behavior feat(onBlur): 移除 onBlur 时添加 option 以及收起面板等默认行为 Jun 19, 2023
@vaynevayne
Copy link
Author

@afc163 这里,

@zombieJ
Copy link
Member

zombieJ commented Jul 19, 2023

onBlur 收起是预期行为,失去焦点不要收起的目的是什么?

@vaynevayne
Copy link
Author

  1. 组件的自定义行为太多了,
  2. 自然自定义了, 那就应该支持撤销该自定义行为,
    但是我看你们的代码, 挺复杂的, 提供撤销操作, 代码会比较复杂, 所以我觉得一开始就应该不加自定义行为, 要么用户自己写, 要么一个扩展 prop,

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.

2 participants