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

feet-bug(module: Transfer): refresh data on change SelectedKeys or TargetKeys parameters #2977

Merged

Conversation

Magehernan
Copy link
Contributor

I added reinitializacion of values when TargetKeys or SelectedKeys change from outside so it properly display the correct values.
I am using this in production and works fine, and is more easy to use this way. I hope it helps.

🤔 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

💡 Background and solution

📝 Changelog

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

@github-actions
Copy link

github-actions bot commented Jan 4, 2023

@codecov
Copy link

codecov bot commented Jan 4, 2023

Codecov Report

Base: 45.03% // Head: 44.99% // Decreases project coverage by -0.03% ⚠️

Coverage data is based on head (3f8ca6f) compared to base (a2fbb93).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2977      +/-   ##
==========================================
- Coverage   45.03%   44.99%   -0.04%     
==========================================
  Files         551      551              
  Lines       25915    25925      +10     
  Branches      263      263              
==========================================
- Hits        11671    11666       -5     
- Misses      14204    14219      +15     
  Partials       40       40              
Impacted Files Coverage Δ
components/transfer/Transfer.razor.cs 0.00% <0.00%> (ø)
components/drawer/Drawer.razor.cs 90.25% <0.00%> (-3.25%) ⬇️

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.

@ElderJames
Copy link
Member

Thanks for contribution @Magehernan !

I think it would be better to refrsh data in the setter of these parameters.

@ElderJames
Copy link
Member

We also need to implement two-way binding, which is to update the external SelectedKeys and TargetKeys from within the component. Are you interested in helping?

@Magehernan
Copy link
Contributor Author

Magehernan commented Jan 4, 2023

I think it would be better to refrsh data in the setter of these parameters.

I try but the problem is it need all the other parameter set for it to work, so for it to work it needed a flag for set initialized and then OnInitialized call Refresh... When i do this, it call Refresh 2 times and with this implementation only is called 1 so more efficient. Let me know what you think.

We also need to implement two-way binding, which is to update the external SelectedKeys and TargetKeys from within the component. Are you interested in helping?

i can try, let me know if you prefer all on this pull request or the two-binding in another.

@ElderJames
Copy link
Member

ElderJames commented Jan 4, 2023

We can fix the two-way binding in another PR. In this PR we need to check if it fix #1229

Update:
here is another issue #534 about refresh.

@Magehernan
Copy link
Contributor Author

Magehernan commented Jan 4, 2023

I almost sure that it will be fix because i am doing async request to the server for fill the targetKeys and i was having that problem that the targetkeys don't appear and with this it was fixed, but maybe there is another case.

@ElderJames ElderJames merged commit 88af57b into ant-design-blazor:master Jan 8, 2023
kooliokey pushed a commit to kooliokey/ant-design-blazor that referenced this pull request Jan 15, 2023
@Magehernan Magehernan deleted the transfer-update-keys branch March 4, 2024 14:58
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.

Transfer component does not pre-populate selected keys if async web service is called
2 participants