-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feat/scout 28 competition groups #33
Conversation
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.
Can you try and debug this issue with updatedDiff
? Perhaps there's a way to make it work properly. I'd rather be consistent and use this on every edit form, in fact, we should probably extract this to a helper function.
@@ -0,0 +1,88 @@ | |||
import { TextField } from '@mui/material' |
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.
There's a typo in file path -> froms
instead of forms
I was unable to find solution that satisfied me within deep-object-diff repo and other packages, maybe I wasn't looking hard enough but nonetheless problem is solved. I copied source file from deep-object-diff and made it to keep any array that it finds, also included filtering so it's all in one helper |
I don't have time to dive deep into this right now but I'm not a huge fan of copying and tweaking code from external libraries. Especially that it looks like there's a good reason why it works like this. Have you seen mattphillips/deep-object-diff#79 You caught a significant issue in our app, good work! We need to rethink what we actually want here if the field of our edit form is an array, I think we can simplify this to 2 cases:
Is this something we can do using functions provided by the BTW, another issue is that we probably should use |
We can't do that using I've made changes and now array isn't returned not touched (order doesn't matter) |
Here's a last message in one of the linked issues. Suggestion of function that we desire as well but it's not implemented
|
I think we can do what we need using this library, I'd just need to sit down and write some code for it to show you what I have in mind. It's not worth our time right now, I'll create separate ticket for this. For now, please remove this copied functionality and go back to the state where we don't use |
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.
Please see my latest comment
There's a issue when regionIds array is passed to endpoind as empty ( [] ) it doesnt update regionIds, I'll create a ticket |
SCOUT-28
Task Description
competition groups module
Additional Notes (optional)
removed updatedDiff from edit form as it converted array into object and broke updating