-
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
Implement multiple #46
Conversation
49ee15c
to
ffdec37
Compare
ffdec37
to
23d7ea7
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.
If I understand correctly this is not a "container" in the sense of the "edit grid" or "repeating groups". This is the "multiple values" checkbox on any single field component, right?
I got interrupted and now I have the feeling I had a question I can't remember... I guess it will come up if it's important 🤷
const remove = (index: number) => { | ||
const _keys = keys.filter((_, i) => i !== index); | ||
const val = value.filter((_, i) => i !== index); | ||
setKeys(_keys); | ||
setValue(path, val); | ||
}; |
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.
For my understanding: we're not allowed to mutate with Array.splice, right?
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.
I'd avoid mutating array as much as possible.
Yes correct, we need to support third party scenario's so we don't want to complicate components too much with this in order. Containers are slightly more tightly coupled with the renderer to take away unwanted complexity. |
I still have to adjust the validation system to work correctly with multiple values. |
427c11e
to
1d218c0
Compare
1d218c0
to
e9506c6
Compare
Sorry, closing this - when we pick up this development again (builder currently has prio since translation management is broken), I will do this via #47 which wipes out most of this implementation path. |
Closes #43