Skip to content

fix(OtherCosts): update supplier options to use supplier ID instead o…#217

Merged
Kariamos merged 2 commits intodevelopfrom
use-correct-index-supplier
Feb 12, 2026
Merged

fix(OtherCosts): update supplier options to use supplier ID instead o…#217
Kariamos merged 2 commits intodevelopfrom
use-correct-index-supplier

Conversation

@Kariamos
Copy link
Contributor

@Kariamos Kariamos commented Feb 11, 2026

This pull request updates the way option values are generated for cost types and suppliers in the OtherCosts section of the campaign quote page. Instead of using the array index as the value, the code now uses the unique id from each item, ensuring more robust and stable identifiers.

Improvements to option value generation:

  • Changed the value property in the options generated by useCostTypes and useSuppliers to use item.id instead of the array index, improving stability and preventing potential issues if the list order changes. [1] [2]
  • In useCostTypes, removed the fallback for the label and now always uses item.name as the label.

@Kariamos Kariamos added the core label Feb 11, 2026
@Kariamos Kariamos merged commit b80231e into develop Feb 12, 2026
1 check passed
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.

2 participants