-
Notifications
You must be signed in to change notification settings - Fork 106
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
feat: [#175114153] Force update birthplace FiscalCodeScreen #2277
Conversation
Affected stories
|
Codecov Report
@@ Coverage Diff @@
## master #2277 +/- ##
==========================================
- Coverage 47.95% 47.95% -0.01%
==========================================
Files 560 560
Lines 16165 16166 +1
Branches 3222 2955 -267
==========================================
Hits 7752 7752
- Misses 8371 8372 +1
Partials 42 42
Continue to review full report at Codecov.
|
@@ -232,11 +232,17 @@ export default function content( | |||
}; | |||
|
|||
case getType(contentMunicipalityLoad.request): | |||
const codiceCatastale = state.municipality.codiceCatastale; | |||
const municipalityData = state.municipality.data; | |||
return { | |||
...state, | |||
municipality: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
municipality: { | |
municipality: { | |
codiceCatastale: pot.toLoading(codiceCatastale), | |
data: pot.toLoading(municipalityData) | |
} |
we need to preserve the loading state
In that way the pot
could be loading (noneLoading, if there is no value) and previous value (some, error, loading) if there is a value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it!
Just for knowledge my code can bring to some wrong behaviour?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it does. It doesn't represent correctly the request status (loading -> success / failure)
Only when the store is empty (isNone
) the status will be right (noneLoading
)
In all other cases (some
, error
) when a request starts we won't have the status loading.
This could be a problem if we have to show a loader in the meantime: it will be shown only under specific scenario
Short description
This PR request the municipality props every time the FiscalCodeScreen is mounted. This allow the user to see change if the data in the backend change.
List of changes proposed in this pull request