select icon indicating copy to clipboard operation
select copied to clipboard

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

Open yuanxin518 opened this issue 1 year ago • 2 comments

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

新增: 增加配置项 ~~tagsModeCommitOnBlur~~preventCommitOnBlur,默认值为true。

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

yuanxin518 avatar Jul 20 '23 12:07 yuanxin518

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

vercel[bot] avatar Jul 20 '23 12:07 vercel[bot]

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

yuanxin518 avatar Jul 20 '23 13:07 yuanxin518