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

Select Component Automatic tokenization feature failed when the mode property is set to 'multiple'. #4844

Closed
1 task done
wanghan-js opened this issue Nov 3, 2021 · 4 comments
Labels

Comments

@wanghan-js
Copy link

wanghan-js commented Nov 3, 2021

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

1.7.8

Environment

os version: macOS Monterey 12.0.1; browser version: Google Chrome latest (95.0.4638.69); Vue version: 2.6.11

Reproduction link

Edit on CodeSandbox

Steps to reproduce

  1. use component
  2. set mode to 'multiple'
  3. set token-separators to [',']
  4. copy and paste a string, like 'abc,def,ghi', in the input element
  5. nothing happened

What is expected?

Automatic tokenization works fine on multiple mode as the docs announced.

What is actually happening?

Nothing happened.

@tangjinzhou
Copy link
Member

1、tags 模式,第二次复制不会填是符合预期的,因为已经有了,会被过滤
2、multiple模式,你要复制列表中包含的值
3、multiple 模式有个bug,复制粘贴时是和子元素对比,所以永远匹配不到,待修复
4、你可以设置 option-label-prop="value" 避开 3中提及的 bug

https://codesandbox.io/s/vue-antd-template-forked-7xs1o?file=/src/App.vue

@tangjinzhou tangjinzhou added the 1.x version 1.x label Nov 5, 2021
@wanghan-js
Copy link
Author

1、tags 模式,第二次复制不会填是符合预期的,因为已经有了,会被过滤 2、multiple模式,你要复制列表中包含的值 3、multiple 模式有个bug,复制粘贴时是和子元素对比,所以永远匹配不到,待修复 4、你可以设置 option-label-prop="value" 避开 3中提及的 bug

https://codesandbox.io/s/vue-antd-template-forked-7xs1o?file=/src/App.vue

谢谢,看来是我自己没有理解这个组件的模式对应的含义。
建议可以在文档中详细说明,不同的 mode 对应着什么功能,以免让人困惑。
另外,我现在能理解,在 tags 模式下,第二次复制,不能回填数据,但是在复制多次后,依然会有部分数据录入到那个隐藏的 input 元素中,看起来像是 bug。
在 ant design react 中则没有这个问题,不论复制粘贴多少次,第二次及以后,input 是没有任何反应的。

@github-actions
Copy link

github-actions bot commented Jan 7, 2022

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants