Skip to content

#10930: fix Annotation circle editing causing MapStore to crash#11255

Merged
MV88 merged 1 commit intogeosolutions-it:masterfrom
mahmoudadel54:issue_10930
Jun 30, 2025
Merged

#10930: fix Annotation circle editing causing MapStore to crash#11255
MV88 merged 1 commit intogeosolutions-it:masterfrom
mahmoudadel54:issue_10930

Conversation

@mahmoudadel54
Copy link
Copy Markdown
Contributor

Description

This PR includes fixing app crash during annotation circle editing.

The problem was the IntlNumberFormControl component was prone to crashing under certain conditions, specifically when this.state.inputRef was null or undefined within the componentDidUpdate lifecycle method here:

componentDidUpdate(prevProps) {
due to change input values from outside the input not by noraml way by focus to input and change value manually.

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (check one with "x", remove the others)

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

Issue

What is the current behavior?

#10930

What is the new behavior?

No crash for app during annotation circle editing will happen

Breaking change

Does this PR introduce a breaking change? (check one with "x", remove the other)

  • Yes, and I documented them in migration notes
  • No

Other useful information

… to crash

- handle prevent crash on null inputRef in IntlNumberFormControl of Radius/Lat/Lng number inputs of annotations
@mahmoudadel54 mahmoudadel54 added this to the 2025.01.01 milestone Jun 30, 2025
@mahmoudadel54 mahmoudadel54 requested a review from tdipisa June 30, 2025 10:01
@mahmoudadel54 mahmoudadel54 self-assigned this Jun 30, 2025
@mahmoudadel54 mahmoudadel54 linked an issue Jun 30, 2025 that may be closed by this pull request
1 task
@tdipisa tdipisa requested review from MV88 and removed request for tdipisa June 30, 2025 10:02
@mahmoudadel54 mahmoudadel54 requested review from tdipisa and removed request for tdipisa June 30, 2025 10:02
Copy link
Copy Markdown
Contributor

@MV88 MV88 left a comment

Choose a reason for hiding this comment

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

LGTM

@MV88 MV88 merged commit 2a85fa8 into geosolutions-it:master Jun 30, 2025
6 checks passed
@MV88
Copy link
Copy Markdown
Contributor

MV88 commented Jun 30, 2025

@ElenaGallo please test it in DEV

@ElenaGallo
Copy link
Copy Markdown
Contributor

Test passed, @mahmoudadel54 please backport to 2025.01.xx. Thanks

mahmoudadel54 added a commit to mahmoudadel54/MapStore2 that referenced this pull request Jul 4, 2025
… to crash (geosolutions-it#11255)

- handle prevent crash on null inputRef in IntlNumberFormControl of Radius/Lat/Lng number inputs of annotations
tdipisa pushed a commit that referenced this pull request Jul 4, 2025
…) (#11285)

- handle prevent crash on null inputRef in IntlNumberFormControl of Radius/Lat/Lng number inputs of annotations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Annotation circle editing causing MapStore to crash

4 participants