Skip to content

Conversation

@MaryamMehd
Copy link
Collaborator

  • Fix comparator selection being lost when selected before entering value
  • Fix unit selection being lost when selected before entering value
  • Always update QR item for comparator and unit changes, even with empty values
  • Handle empty parsedNewInput in createQuantityItemAnswer to prevent NaN
  • Add debug logging to track QR updates
  • Add test stories QuantityBasicComparator and QuantityMultiUnit

Resolves: #1616

- Fix comparator selection being lost when selected before entering value
- Fix unit selection being lost when selected before entering value
- Always update QR item for comparator and unit changes, even with empty values
- Handle empty parsedNewInput in createQuantityItemAnswer to prevent NaN
- Add debug logging to track QR updates
- Add test stories QuantityBasicComparator and QuantityMultiUnit

Resolves: #1616
@MaryamMehd MaryamMehd requested a review from fongsean October 3, 2025 06:43
@fongsean
Copy link
Collaborator

Closing as the Quantity component does not actually contain any issues, the issue lies in the testing function https://github.com/aehrc/smart-forms/blob/alpha/packages/smart-forms-renderer/src/stories/testUtils.ts#L46.

@fongsean fongsean closed this Oct 20, 2025
@fongsean fongsean deleted the fix/quantity-stories-bug-1616 branch October 28, 2025 06:06
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.

Quantity stories test bug

4 participants