#226 bugfix of adressNL crashing inside the editgrid#289
#226 bugfix of adressNL crashing inside the editgrid#289sergei-maertens merged 2 commits intomainfrom
Conversation
1a89a04 to
0f19619
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #289 +/- ##
=======================================
Coverage 69.26% 69.26%
=======================================
Files 288 288
Lines 10822 10823 +1
Branches 1753 1753
=======================================
+ Hits 7496 7497 +1
Misses 3322 3322
Partials 4 4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| // debounce to avoid rapidly firing updates when the user is typing | ||
| const addressData = useDebounce(value, 300); | ||
| const {postcode, houseNumber} = addressData; | ||
| const {postcode, houseNumber} = addressData ?? {}; |
There was a problem hiding this comment.
I don't fully understand yet why value can be briefly undefined and if that's not the root cause that should be fixed. If it's valid, then I'd also at least expect the types to be updated to indicate it can be undefined, because this is a typical situation that should be preventable with typescript.
There was a problem hiding this comment.
You are right, it was not a proper solution. I've changed it, now the bugifx should make more sense
…he formik context When a user clicks on the "edit" button in the editgrid, react rerenders component as an isolated EditGridItem and creates an isolated formik context, where the field names have a prefix like "editgrid:0". Therefore we need to prefix the field name with 'useFieldConfig' hook in order to find the data in the new isolated context.
0f19619 to
7aef044
Compare
fixes #266