react-component / select

React Select
https://select.react-component.now.sh/
MIT License
892 stars 452 forks source link

feat(select): allows select the behavior of triggering blur event in … #962

Open yuanxin518 opened 11 months ago

yuanxin518 commented 11 months ago

select组件,mode="tags"时候,任意输入文字,失去焦点自动生成了tag

新增: 增加配置项 tagsModeCommitOnBlurpreventCommitOnBlur,默认值为true。

功能: 默认情况下,处于tags模式下的select框在输入文字后失去焦点的时候会默认的submit,结果就是生成一个新的tag并记录tag。参考上述提供的issue,提供 tagsModeCommitOnBlur preventCommitOnBlur来实现当此配置的valuefalse true 的时候,失去焦点不默认触发submit 在任何模式下失去焦点的时候都会阻止submit行为,也就是不生成一个新的标签并且不记录,只有当点击候选框中的标签的时候才会生成。

vercel[bot] commented 11 months ago

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

Name Status Preview Comments Updated (UTC)
select ❌ Failed (Inspect) Jul 20, 2023 1:47pm
yuanxin518 commented 11 months ago

preventCommitOnBlur的Api形式,默认为false,当设置为true的时候,失焦不会触发commit行为