Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Record form calculated fields #480

Merged

Conversation

awensaunders
Copy link
Contributor

This implements calculated fields at the record level, as opposed to just at the subform level.

I've put the logic in the record-form component because it's necessary to recalculate whenever any of the relevant fields on the record change, even if the calculated field component is not currently rendered (perhaps as it's on a different form section).

This still needs some refactoring as eslint
doesn't like where the code currently lives.
This gets around the issue that eslint was
complaining about as the react hook is now at the
top level, and we pass a closure into it.
@awensaunders awensaunders force-pushed the record-form-calculated-fields branch from 838108c to 74bf634 Compare October 20, 2024 17:12
@awensaunders awensaunders changed the base branch from develop to main October 20, 2024 17:13
@pnabutovsky pnabutovsky merged commit fddd3c9 into primeroIMS:main Oct 29, 2024
4 checks passed
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.

2 participants