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

fix[Select]: paste input value still display bug #7965

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yugasun
Copy link
Contributor

@yugasun yugasun commented Dec 4, 2024

Automatic tokenization multiple select with mode tags, it has a bug, when I paste string like a,b,c, the input string is still keep, like below:
img_v3_02h8_ce7a1278-278f-4a19-8ceb-5b4bcf83d40g

After:
img_v3_02h8_052536a5-2d4a-46c3-ba89-1ae9cfd25ceg

@Tpraise
Copy link

Tpraise commented Dec 7, 2024

不太优雅的方式临时解决这个bug

const searchValue = ref<string>('');
function change() {
  // 改变searchValue的值,触发监听方法清空InputValue和targetValue
  searchValue.value = ' ';
  nextTick(() => {
    searchValue.value = '';
  });
}
<Select
  :search-value="searchValue"
  :token-separators="[',', '\n']"
  mode="tags"
  @change="change"
/>

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