-
Notifications
You must be signed in to change notification settings - Fork 78
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
LF-4251: Add more inputs to AddSoilAmendmentProducts component #3241
LF-4251: Add more inputs to AddSoilAmendmentProducts component #3241
Conversation
ecd3192
to
373c1e7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great overall!
EDITED: NEVERMIND the request changes I think I did the same thing as before with 1:1 vs percent and thinking it was not working lol
I also thought at first it was not possible to "clear" moisture content percent back to undefined/null values but instead of using backspace I used delete and it was ok.
Thank you @Duncan-Brain for reviewing! I noticed that I forgot to add options for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay the form has gotten rather long + complicated but this looks really good!
I think I do mostly follow the form logic now and the relationship between the two... I think the <QuantityApplicationRate />
will need to call useFormContext()
as you mentioned on that PR, and also have the namePrefix
applied to all fields, correct? It shouldn't be too bad then, I think.
rules={{ required: true }} | ||
rules={{ | ||
required: true, | ||
validate: (value) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using this + the form isValid
state is indeed quite improved (simplified) from getInvalidProductsUpdater
🙂 I like it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks amazing! A flakey test failed on cropVariety tests so I re-ran the test.
@kathyavini Thank you for reviewing! |
Saw this pattern in #3241 and liked it
…AddSoilamendmentProducts_component LF-4251: Add more inputs to AddSoilAmendmentProducts component
Description
I rebased the branch!⚠️ 🙏
useExpandableItem
to handle empty props.CompositionInputs
andNumberInputWithSelect
tounit
field will not be registered forreact-hook-form
)justifyContent
to centre the selected unit. (It will still be right-aligned when disabled.)Jira link: https://lite-farm.atlassian.net/browse/LF-4251
Type of change
How Has This Been Tested?
Checklist: