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

🐛 [Bug]: [tiny-select]clear-no-match-value为true且初始值为空时无法选中任何项 #1760

Closed
ichynul opened this issue Jul 20, 2024 · 5 comments
Assignees
Labels
bug Something isn't working done 已完成/已修复

Comments

@ichynul
Copy link
Contributor

ichynul commented Jul 20, 2024

Version

3.16

Vue Version

3.x

Link to minimal reproduction

https://opentiny.design/vue-playground?mode=pc&theme=smb#3.16|eyJzcmMvQXBwLnZ1ZSI6IjxzY3JpcHQgbGFuZz1cInRzeFwiPlxyXG4vLyDlvJXlhaUgQG9wZW50aW55L3Z1ZSDnu4Tku7ZcclxuaW1wb3J0IHsgQnV0dG9uLCBMaW5rIH0gZnJvbSAnQG9wZW50aW55L3Z1ZSdcclxuXHJcbmV4cG9ydCBkZWZhdWx0IHtcclxuICBjb21wb25lbnRzOiB7XHJcbiAgICBUaW55QnV0dG9uOiBCdXR0b24sXHJcbiAgICBUaW55TGluazogTGlua1xyXG4gIH0sXHJcbiAgZGF0YSgpIHtcclxuICAgIHJldHVybiB7XHJcbiAgICAgIG1zZzogJ2hlbGxvIHdvcmxkISdcclxuICAgIH1cclxuICB9XHJcbn1cclxuPC9zY3JpcHQ+XHJcblxyXG48dGVtcGxhdGU+XHJcbiAgPFRpbnlCdXR0b24+56Gu5a6aPC9UaW55QnV0dG9uPlxyXG4gIDxoMT57eyBtc2cgfX08L2gxPlxyXG4gIDxkaXYgY2xhc3M9XCJ0aW55dnVlXCI+XHJcbiAgICA8ZGl2IGNsYXNzPVwidGlueXZ1ZS1wYWdlXCI+XHJcbiAgICAgIHRpbnl2dWVcclxuICAgICAgPHRpbnktbGluayB0eXBlPVwic3VjY2Vzc1wiIGhyZWY9J2h0dHBzOi8vZ2l0aHViLmNvbS9vcGVudGlueS90aW55LXZ1ZSc+XHJcbiAgICAgIC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n5YyX5LqsJyB9LFxuICAgICAgICB7IHZhbHVlOiAn6YCJ6aG5MicsIGxhYmVsOiAn5LiK5rW3JyB9LFxuICAgICAgICB7IHZhbHVlOiAn6YCJ6aG5MycsIGxhYmVsOiAn5aSp5rSlJyB9LFxuICAgICAgICB7IHZhbHVlOiAn6YCJ6aG5NCcsIGxhYmVsOiAn6YeN5bqGJyB9LFxuICAgICAgICB7IHZhbHVlOiAn6YCJ6aG5NScsIGxhYmVsOiAn5rex5ZyzJyB9XG4gICAgICBdLFxuICAgICAgdmFsOiAnJyxcbiAgICB9XG4gIH1cbn1cbjwvc2NyaXB0PlxuXG48c3R5bGUgbGFuZz1cImxlc3NcIiBzY29wZWQ+XG4udGlueS1zZWxlY3Qge1xuICB3aWR0aDogMjgwcHg7XG59XG5wIHtcbiAgZm9udC1zaXplOiAxNHB4O1xuICBsaW5lLWhlaWdodDogMS41O1xufVxuPC9zdHlsZT5cbiIsIl9vIjp7fX0=

Step to reproduce

<tiny-select v-model="val" :clear-no-match-value="true">
      <tiny-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </tiny-option>
    </tiny-select>

What is expected

clear-no-match-value应该对值为空的情况特殊处理一下

What is actually happening

No response

What is your project name

Any additional comments (optional)

No response

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Title: 🐛 [Bug]: [tiny-select]No item can be selected when clear-no-match-value is true and the initial value is empty

@GaoNeng-wWw GaoNeng-wWw added the bug Something isn't working label Jul 21, 2024
@shenjunjian
Copy link
Collaborator

经验证, 单选时,配置了clear-no-match-value属性后, 无法选中元素了,确认为bug。
多选时,一切功能正常。

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


It has been verified that during single selection, after configuring the clear-no-match-value attribute, the element cannot be selected, which is confirmed to be a bug.
When making multiple selections, everything functions normally.

@shenjunjian shenjunjian added the developing 正在开发中 label Jul 31, 2024
@shenjunjian
Copy link
Collaborator

已经修复了此bug, 在 tinyVue@3.19之后的版本都可以正常使用了。

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


This bug has been fixed, and versions after tinyVue@3.19 can be used normally.

@shenjunjian shenjunjian added done 已完成/已修复 and removed developing 正在开发中 labels Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working done 已完成/已修复
Projects
None yet
Development

No branches or pull requests

4 participants