Skip to content

Conversation

@mkrbr
Copy link
Contributor

@mkrbr mkrbr commented Jun 11, 2025

Ensures the number widget correctly handles null, undefined, and empty string values, setting the field value to null in these cases.

This change prevents unexpected behavior when the user clears the input field, ensuring data consistency.

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

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

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

What is the current behaviour? (You can also link to an open issue here)
Empty string is send when number field is cleared in form.
https://hyland.atlassian.net/browse/AAE-35668

What is the new behaviour?
Null is send when number field is cleared in form.

Does this PR introduce a breaking change? (check one with "x")

  • Yes
  • No

If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...

Other information:

Ensures the number widget correctly handles null, undefined, and empty string values, setting the field value to null in these cases.

This change prevents unexpected behavior when the user clears the input field, ensuring data consistency.
Adds a test case to verify the behavior of the number widget when it's in readonly mode.

The test checks if the displayValue is correctly set using the decimalNumberPipe when the readOnly property is true.
eromano and others added 3 commits June 11, 2025 11:24
…tead-of-null-after-clearing-value-from-numeric-field
Updates number widget tests to use `overrideComponent` for providing mocked dependencies. This approach ensures proper isolation and avoids potential issues with shared state between tests.
Additionally, it adds a test case to verify the `displayValue` is correctly set using the mocked `DecimalNumberPipe`.
…tring-instead-of-null-after-clearing-value-from-numeric-field' into fix/AAE-35668-fe-sending-empty-string-instead-of-null-after-clearing-value-from-numeric-field
@sonarqubecloud
Copy link

@mkrbr mkrbr merged commit e2693f9 into develop Jun 11, 2025
18 checks passed
@mkrbr mkrbr deleted the fix/AAE-35668-fe-sending-empty-string-instead-of-null-after-clearing-value-from-numeric-field branch June 11, 2025 09:53
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.

3 participants