Questions tagged [react-final-form-arrays]

53 questions
4
votes
1 answer

How to format the value of a checkbox Field using React Final Form Field Array?

In React Final Form, we can use format or parse props for text type inputs in order to store a different value than the one specified, but this does not seems to work the same way with checkboxes. Example:
Carlos
  • 855
  • 2
  • 9
  • 18
4
votes
2 answers

Providing initialValues for an array in final-form-arrays causes state changes to reset the whole form, how can i prevent this?

I have a form that uses final-form-arrays. The form works and validation works, however, when i make a state change inside the component, it resets all my values. I was able to replicate the issue with the same example that react-final-form-arrays…
xunux
  • 1,531
  • 5
  • 20
  • 33
4
votes
1 answer

props.mutators is deprecated

My code is working, but I got a warning : Warning: As of React Final Form v3.3.0, props.mutators is deprecated and will be removed in the next major version of React Final Form. Use: props.form.mutators instead. Check your ReactFinalForm…
Xero
  • 3,951
  • 4
  • 41
  • 73
2
votes
1 answer

How can I reverse the order that items are added to the fields in final-form/react-final-form-arrays so most recent is first

Im using final-form/react-final-form-arrays library is there a way to sort by most recent field appearing first. The FieldArray component has the fields prop which is array like but does not have a reverse function. So each time I add a new field…
Sean
  • 43
  • 5
2
votes
0 answers

React Final Form - Field Array - form pristine

I am using react final form and a react final form array in the form. The Pristine part of the form is attached to the submit button. However if I open a pre filed in form, remove a value from the array and put the same value back in, the pristine…
2
votes
3 answers

React Forms : How to make input data as list objects with same input name?

I'm Posting input data to API's where the API's structure as array list with n objects. Problem: The problem I'm facing is while handling the change, i'm replacing the data instead of inserting as an another object. My code as follows: the objects…
Ramlal S
  • 1,573
  • 1
  • 14
  • 34
2
votes
2 answers

Conditional dropdowns with react-select in react-final-form initialized from the state

I'm using react-select and react-final-form for conditional dropdowns, where options for the second select are provided by a component based on the value of the first select (thanks to this SO answer). Here is the component: /**…
2
votes
3 answers

Unable to set initialValue on final form array

I'm having problems setting the initialValue of a FieldArray component in React Final Form. It works when I set it on the Form component, but not on the FieldArray. Please see below CodeSandbox examples: On…
Jan Swart
  • 6,761
  • 10
  • 36
  • 45
2
votes
0 answers

How to upload, replace and delete multiple images to react-final-form

I want to create, replace and delete 3 images within a form. I'm using react-final-form and just wondered how I would do this? I can get three file inputs on the page but figure out how to update each file in the array or delete them. I would like…
2
votes
1 answer

How do I combine `final-form-calculate` with `final-form-array`

I have a form which uses react-final-form-array in order to have many "Attendees". I'm wanting each of the Attendee.Email inputs to do a web lookup and then set the Attendee.FirstName and Attendee.Surname based off the result. I'm not sure how this…
alt
  • 2,356
  • 2
  • 21
  • 28
1
vote
2 answers

React Final Form - Radio buttons won't work inside a FieldArray

I have radio button group rendered dynamically using a FieldArray. {({ fields }) => fields.map((name, index) => (
sbedulin
  • 4,102
  • 24
  • 34
1
vote
0 answers

How to pass initial values to Field Array in Final Form

I have a react select using sortable container and the values that are extracted are like: { "fruits": [ { "id": 3, "value": "vanilla", "label": "Vanilla" }, { "id": 1, "value": "chocolate", …
1
vote
0 answers

React Final Form FieldArray validation on form.restart

I have a form with a fields array. At the bottom of the form there is a button that deletes all list items (in fact, it does form.restart). When deleting fields, the validation of each field is triggered, but the value of the field is undefined.…
1
vote
0 answers

React Final Form Arrays blurring custom fields

I'm using Final Form arrays to dynamically render custom fields that consist of two text fields, both of which are validated. I'm not sure how to go about blurring the fields individually. This is what I currently have:
Damjan Vučina
  • 352
  • 2
  • 12
1
vote
0 answers

Semantic React UI controlled components not working with React Final Form

This question has also been raised on the react-final-form github issues list at https://github.com/final-form/react-final-form/issues/939 I'm using Semantic React UI 2.02 with react-final-form 6.5.3. First Issue I have a controlled Semantic React…
1
2 3 4