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: select): add tags when datasource is empty #2986

Conversation

wss-javeney
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

fixes #2965

💡 Background and solution

When there was a select component set to Tags mode and the datasource was empty, any entered tag options were being hidden from user even though they went through the two way binding.

There was an issue where whenever the datasource was empty it would use Clear() on the option list instead of letting the change trickle down to where it updates the option list based on the datasource. To ensure the user entered tags do not go away I add them after the option list is created.

📝 Changelog

Language Changelog
🇺🇸 English Select mode Tags will retain tag options when datasource is empty
🇨🇳 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

@pr-triage pr-triage bot added the PR: draft label Jan 5, 2023
@github-actions
Copy link

github-actions bot commented Jan 5, 2023

@codecov
Copy link

codecov bot commented Jan 5, 2023

Codecov Report

Base: 43.61% // Head: 44.99% // Increases project coverage by +1.37% 🎉

Coverage data is based on head (97cca5d) compared to base (9f83920).
Patch coverage: 33.33% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2986      +/-   ##
==========================================
+ Coverage   43.61%   44.99%   +1.37%     
==========================================
  Files         551      551              
  Lines       25923    25913      -10     
  Branches      263      263              
==========================================
+ Hits        11306    11659     +353     
+ Misses      14577    14214     -363     
  Partials       40       40              
Impacted Files Coverage Δ
components/select/SelectBase.cs 71.38% <0.00%> (+0.46%) ⬆️
components/select/Select.razor.cs 52.26% <37.50%> (-0.72%) ⬇️
components/drawer/Drawer.razor.cs 90.25% <0.00%> (-3.25%) ⬇️
components/input/Input.cs 68.81% <0.00%> (+0.35%) ⬆️
components/date-picker/internal/DatePickerBase.cs 79.01% <0.00%> (+0.66%) ⬆️
components/core/CssSizeLength.cs 86.07% <0.00%> (+1.07%) ⬆️
components/grid/Col.razor.cs 96.00% <0.00%> (+1.33%) ⬆️
components/core/Extensions/JSRuntimeExtensions.cs 53.33% <0.00%> (+3.33%) ⬆️
... and 11 more

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

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@wss-javeney wss-javeney marked this pull request as ready for review January 5, 2023 19:26
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.

Select component removes selected Tag options when Datasource is empty
2 participants