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(module TreeSelect / Tree): search not working on TreeSelect #2686

Merged

Conversation

Magehernan
Copy link
Contributor

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • Bundle size optimization
  • Performance optimization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

Enabling Search on TreeSelect not working.

💡 Background and solution

When you try to use search on tree select it not work, the code is like the search in select, so base on that i include the part that was missing and make it work.

At the same time i impove the search on tree because it was case sensitive. I make it work with ignore case and found that the code that apply styles to titles was using the input so i change that to use the original value and insert the span with class and style to make it work.

📝 Changelog

Fix search on treeselect
Change tree search to ignoreCase and fix display of match to respect the original value.

Language Changelog
🇺🇸 English
🇨🇳 Chinese

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • Changelog is provided or not needed

… Trying to change minimum posible to make it work.

Add ignoreCase for search on tree and fix display of match to respect the original value.
@github-actions
Copy link

github-actions bot commented Sep 6, 2022

@codecov
Copy link

codecov bot commented Sep 6, 2022

Codecov Report

Merging #2686 (1a42923) into master (08f1ba4) will increase coverage by 1.04%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #2686      +/-   ##
==========================================
+ Coverage   38.91%   39.95%   +1.04%     
==========================================
  Files         505      543      +38     
  Lines       33590    25701    -7889     
  Branches        0      260     +260     
==========================================
- Hits        13072    10270    -2802     
+ Misses      20518    15391    -5127     
- Partials        0       40      +40     
Impacted Files Coverage Δ
components/tree-select/TreeSelect.razor 0.00% <0.00%> (ø)
components/tree-select/TreeSelect.razor.cs 0.00% <0.00%> (ø)
components/tree/Tree.razor.cs 0.00% <0.00%> (ø)
components/tree/TreeNodeTitle.razor 0.00% <0.00%> (ø)
components/breadcrumb/Breadcrumb.razor.cs 90.00% <0.00%> (-10.00%) ⬇️
components/core/Helpers/MemberPath/PathNode.cs 46.15% <0.00%> (-8.85%) ⬇️
components/avatar/AvatarGroup.razor 75.00% <0.00%> (-8.34%) ⬇️
components/core/Reflection/TypeDefined.cs 77.77% <0.00%> (-7.94%) ⬇️
components/input/InputGroup.razor.cs 87.50% <0.00%> (-6.95%) ⬇️
components/core/Helpers/DateHelper.cs 85.33% <0.00%> (-4.90%) ⬇️
... and 446 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@ElderJames
Copy link
Member

@Magehernan Thanks for contribute this. IMO this is a feature for tree-select.

@Magehernan
Copy link
Contributor Author

@ElderJames haha, i wasn't sure and i opted for fix because TreeSelect has EnableSearch but it not work so for that maybe was a fix... i don't know the specification of this feature so maybe it covers the requirements. I hope it helps.

@ElderJames
Copy link
Member

@Magehernan A searching demo for TreeSelect is need.

@Magehernan
Copy link
Contributor Author

@ElderJames i added one using the multiple example, i use google translate for chinise translation, please check if it is valid.

Copy link
Member

@ElderJames ElderJames left a comment

Choose a reason for hiding this comment

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

LGTM

@ElderJames ElderJames merged commit 7f9365d into ant-design-blazor:master Sep 13, 2022
@Magehernan Magehernan deleted the feat/tree-select-search branch September 13, 2022 01:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants