Skip to content

#226 bugfix of adressNL crashing inside the editgrid#289

Merged
sergei-maertens merged 2 commits intomainfrom
issue/266-editgrid-with-addressnl
Mar 9, 2026
Merged

#226 bugfix of adressNL crashing inside the editgrid#289
sergei-maertens merged 2 commits intomainfrom
issue/266-editgrid-with-addressnl

Conversation

@annashamray
Copy link
Contributor

@annashamray annashamray commented Mar 6, 2026

fixes #266

@annashamray annashamray force-pushed the issue/266-editgrid-with-addressnl branch from 1a89a04 to 0f19619 Compare March 6, 2026 15:55
@codecov
Copy link

codecov bot commented Mar 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.26%. Comparing base (769167d) to head (7aef044).
⚠️ Report is 3 commits behind head on main.

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           
Flag Coverage Δ
storybook 89.62% <100.00%> (+<0.01%) ⬆️
vitest 53.87% <50.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

// debounce to avoid rapidly firing updates when the user is typing
const addressData = useDebounce(value, 300);
const {postcode, houseNumber} = addressData;
const {postcode, houseNumber} = addressData ?? {};
Copy link
Member

Choose a reason for hiding this comment

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

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right, it was not a proper solution. I've changed it, now the bugifx should make more sense

@annashamray annashamray marked this pull request as draft March 9, 2026 08:55
…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.
@annashamray annashamray force-pushed the issue/266-editgrid-with-addressnl branch from 0f19619 to 7aef044 Compare March 9, 2026 11:19
@annashamray annashamray marked this pull request as ready for review March 9, 2026 14:09
Copy link
Member

@sergei-maertens sergei-maertens left a comment

Choose a reason for hiding this comment

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

Good find!

@sergei-maertens sergei-maertens merged commit b0df7c0 into main Mar 9, 2026
24 checks passed
@sergei-maertens sergei-maertens deleted the issue/266-editgrid-with-addressnl branch March 9, 2026 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Repeating groups crashes if you put an addressNL component inside

2 participants