Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: keep default asset when reloading #607

Merged
merged 3 commits into from
Nov 17, 2022
Merged

fix: keep default asset when reloading #607

merged 3 commits into from
Nov 17, 2022

Conversation

12rambau
Copy link
Member

@12rambau 12rambau commented Nov 17, 2022

Fix #596

I simply moved the default_asset addition into the _get_items method.
I also trigger the full _get_items when the default_asset is changed

from sepal_ui import sepalwidgets as sw 

widget = sw.AssetSelect(default_asset=["users/bornToBeAlive/random300"])
widget

widget.default_asset = ["users/bornToBeAlive/random150"]

@codecov
Copy link

codecov bot commented Nov 17, 2022

Codecov Report

Merging #607 (2bf9b87) into main (7f1e314) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #607      +/-   ##
==========================================
- Coverage   92.21%   92.20%   -0.02%     
==========================================
  Files          36       36              
  Lines        3892     3886       -6     
==========================================
- Hits         3589     3583       -6     
  Misses        303      303              
Impacted Files Coverage Δ
sepal_ui/sepalwidgets/inputs.py 100.00% <100.00%> (ø)

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

@12rambau 12rambau marked this pull request as draft November 17, 2022 09:16
@12rambau 12rambau marked this pull request as ready for review November 17, 2022 09:25
@12rambau
Copy link
Member Author

@dfguerrerom just ignore the codecov patch value, input.py is covered at 100% there is nothing I can add.

Copy link
Collaborator

@dfguerrerom dfguerrerom left a comment

Choose a reason for hiding this comment

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

simplier!

@12rambau 12rambau merged commit 089e5d1 into main Nov 17, 2022
@12rambau 12rambau deleted the asset branch November 17, 2022 20:37
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

custom assets are removed when reloading AssetSelect component
2 participants