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): select component cannot be searched accurately #2644

Closed
wants to merge 6 commits into from

Conversation

lq9958
Copy link
Contributor

@lq9958 lq9958 commented Aug 15, 2023

Types of changes

  • New feature
  • Bug fix
  • Enhancement
  • Component style change
  • Typescript definition change
  • Documentation change
  • Coding style change
  • Refactoring
  • Test cases
  • Continuous integration
  • Breaking change
  • Others

Background and context

Solution

How is the change tested?

Changelog

Component Changelog(CN) Changelog(EN) Related issues
Select 修复select组件无法精准搜索的问题 fix select component cannot be searched accurately #2643

Checklist:

  • Test suite passes (npm run test)
  • Provide changelog for relevant changes (e.g. bug fixes and new features) if applicable.
  • Changes are submitted to the appropriate branch (e.g. features should be submitted to feature branch and others
    should be submitted to main branch)

Other information

@lq9958 lq9958 changed the title 修复Select搜索时无法精准定位的问题 fix(select): select component cannot be searched accurately Aug 15, 2023
@lq9958 lq9958 changed the title fix(select): select component cannot be searched accurately fix(select): select component cannot be searched accurately Aug 15, 2023
(
option: SelectOptionInfo | SelectOptionGroupInfo,
nextOption: SelectOptionInfo | SelectOptionGroupInfo
) => option.label.length - nextOption.label.length
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里的排序方式不太合适,会打乱原始的选项顺便。针对精准匹配场景,可以仅将精准匹配结果置顶

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里的排序方式不太合适,会打乱原始的选项顺便。针对精准匹配场景,可以仅将精准匹配结果置顶

这里只是改变了搜索结果数据项的顺序,原始数据项optionInfos的顺序并没有改变啊🤔

@lq9958 lq9958 closed this Oct 13, 2023
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