Questions tagged [redux-form]

Renowned for its seamless integration with both React and Redux, Redux Form revolutionizes the way forms in React interact with Redux by effectively centralizing and storing all of their state using Redux.

Using TypeScript with Redux for Form Validation in FieldArray

My first time implementing a FieldArray from redux-form has been quite a learning experience. The UI functions properly, but there seems to be some performance issues that I need to investigate further. Basically, the concept is to click an ADD button to i ...

How can I update the value of a Material-UI v4 textField using Redux-form?

How can I update the value of a TextField using redux-form? My current version includes: "@material-ui/core": "^4.11.0" "redux-form": "^8.3.6" Prior to implementing redux-form, I was able to update the TextFiel ...

Establish the starting value for the material user interface checkbox

function mapStateToProps(state) { return { model: Selectors.Quotes.getCurrentQuote(state), }; } class Customer extends Component { state = { checkedEnergyConcessionHolder: false }; ...

Reactjs implemented with Material UI and redux form framework, featuring a password toggle functionality without relying on hooks

Currently, I am working on a react project where I have developed a form framework that wraps Material-UI around Redux Form. If you want to check out the sandbox for this project, you can find it here: https://codesandbox.io/s/romantic-pasteur-nmw92 For ...

Implement a dynamic option select component using Material-UI and Redux Form

When I make a request to the backend, I retrieve gift and person data. My objective is to establish a connection between the gifts and the individuals. Each person will receive a gift. To achieve this, I am utilizing the material-ui and redux-form packag ...

Utilize Redux Form with Material-UI components to create a unique DatePicker form with enabled text input functionality

I am currently utilizing the DatePicker component within my Field from redux form. However, I am facing an issue where the date picker automatically opens every time I focus on the field. This prevents me from manually inputting or pasting a date using the ...

The dynamic categorization feature in Redux Form

My approach with Redux Form involves dynamically populating the subcategories in a select field based on the category selected by the user. I accomplished this by creating an API for fetching all categories, triggering an action to load these categories in ...

omitting post request using axios in react js with redux form (does not transmit any data in post request)

I am currently facing an issue where I am trying to make a post request using axios, to send a form to the backend. However, when I use the post request, nothing is being sent. I am utilizing redux-form to capture the form data and axios to send it to a Fl ...

An error occurred while validating Redux Form due to using field names such as user.name

In my React component, I have a Redux form structured like this: <div className="col-sm-12"> <div className="form-group row"> <div className="col-sm-4"> <label>A. Name</label> </div> <div className="col-sm- ...

What are some ways to decrease the dimensions of my dateTimePicker?

I'm looking to decrease the dimensions of my datetime picker box. Here's an image of my current dateTimePicker: https://i.stack.imgur.com/MeJlq.png Below is the component I'm using: import React, { useState } from 'react'; import ...

How can I fetch the option id instead of the displayed string in the Autocomplete component?

I am currently working on a project that involves React, material-ui, and redux-form. One challenge I have encountered is with select fields that sometimes contain many options, leading users to request a select field with search functionality. To address ...

error message saying that the name property is undefined

Utilizing redux-form, I have passed the TextField of material-ui as a prop to Field of redux-form. Everything else seems to be working perfectly as expected. <Field id="firstName" name="firstName" floatingLabelText="Username" errorText= ...

How to integrate Material-UI's DatePicker component with react and redux-form in my project

As I was troubleshooting some issues, I encountered a roadblock with sending DatePicker data to my form. While most of the elements in my form are from redux-form-material-ui, DatePicker is not included in it. I came across two methods of incorporating th ...

How do I specify the default checked value for a checkbox in Redux Form?

Within our Redux Form 5.3 application (not version 6.x), the goal is to display an <input type="checkbox" /> in this manner: // Sometimes, fieldHelper.checked starts off as undefined. When a checkbox is // clicked by the user, fieldHelper.checked is ...

The type '{}' is lacking the 'submitAction' property, which is necessary according to its type requirements

I'm currently diving into the world of redux forms and typescript, but I've encountered an intriguing error that's been challenging for me to resolve. The specific error message reads as follows: Property 'submitAction' is missing in type '{}' but require ...

Issue with integrating Material-UI's Menu Item and Select components in redux-form Field (redux form 8.2)

My goal is to create a dropdown select using Material-UI within a redux-form. I found an example for incorporating M-UI's selects into a redux form on their website. I want to replicate the same example but using Material UI's MenuItems instead ...

When material-ui and redux-form are being connected using mapping, the styling does not seem to

Here is the codesandbox I've created: https://codesandbox.io/s/pk8p4lvl90 I am able to follow the material-ui instructions () perfectly fine without using the mapping mechanism. However, when I try to apply the mapping, the material-ui look for a textfiel ...

Is there a way to make the text field in a redux-form FieldArray read-only with initial values, but allow it to be editable when a new field.push

I am facing a challenge in creating a redux-form that loads data into a modal with initial values. Specifically, I want one of the fields (quoteField) to render as readOnly when there is initial data present. The initial data will always contain at least o ...

Unforeseen issues arise when using material ui's Select component in conjunction with 'redux-form'

I am encountering an issue with a 'redux form' that includes a Select component from the latest material-ui-next. import { TextField } from 'material-ui'; <Field name="name" component={TextField} select > <MenuItem value={1}>Lily& ...

Issue with Material UI TextField and Redux Form integration

Having trouble with a textfield that I am trying to integrate with Redux Form. Here is how I have set it up: const renderTextField = props => ( <TextField {...props} /> ); Usage example: <Field id="searchCif" name="sear ...

How can I add a comma after every third number in a react component?

I am currently developing an input feature where I need to insert a comma after every 3 numbers, such as (352,353,353). The challenge is to display this format in a text field. Since I am new to working with React, I would appreciate any guidance on how to ...

Managing the form properties of a redux-form enhanced with material-ui styling

I am currently working on creating a login form that makes an API call to retrieve a token. As someone new to react and redux, I followed the steps outlined in this tutorial to achieve this. The login form utilizes redux-form. Below is the code snippet f ...

Cannot properly set initial values for redux-form when using material-ui components

Struggling to utilize my redux form for updating an object, I am facing difficulty setting initialValues despite following the guidelines. I found a discussion on github regarding this issue and tried passing initial values as props https://github.com/eri ...

Password validation in Redux-form will only be triggered once both password fields have been touched

My unique custom component utilizes an SFC that resembles: export const InputField = field => ( <div> <TextField required={field.required} invalid={field.meta.touched && !!field.meta.error} label={field.label} {...field.inpu ...

Clearing values in a Redux form

I am using Redux to toggle the visibility of components based on a value. I want to reset values when switching between options. How can I clear state values when switching between fields that are being hidden or shown? What is the best approach for vali ...

Encountering an issue with resolving 'material-ui/Radio' in Redux-form-material-ui

Recently, I upgraded to the latest version (v1) of material-UI and followed the recommendation to install v1 alongside the current version with the commands: yarn add material-ui@latest yarn add material-ui-next@npm:material-ui@next However, when attempt ...

Changing external variables within a React component

I've been working on creating a form using redux-form that includes a dynamic set of checkboxes. The issue I'm facing is that these checkboxes are being passed to the component through props, preventing me from utilizing them in the fields section of the ...

Invoking the dispatch(change) function from redux-form while inside a redux-saga

I have a process that communicates with a webservice to retrieve a new sales order number and updates the state with it. Everything is functioning well and here's how it looks: //SAGA FOR NEW SALES NUMBER function getNewSalesNumber(salesRepId, typeId ...

What is the best way to add both the id and the full object to an array list at the

Requirements: "admin-on-rest": "^1.3.3", "base64-js": "^1.2.1", "react": "^16.2.0", "react-dom": "^16.2.0" I have a User model that includes a List of Roles. // User { id: "abcd1234", name: "John Doe", ... authorities: [ { ...

When testing, Redux form onSubmit returns an empty object for values

Is it possible to pass values to the onSubmit handler in order to test the append function? Currently, it always seems to be an empty object. Test Example: const store = createStore(combineReducers({ form: formReducer })); const setup = (newProps) => ...

Unable to trigger enzyme test click event on a material ui Checkbox within a redux-form Field component

I am currently working on setting up an enzyme/mocha/chai test to replicate the scenario where the state of a materialUI Checkbox component changes from true to false. The Checkbox is enclosed within a redux-form Field, and I am facing difficulties in simu ...

Using Redux Form to Access References in a Child Component

Recently, I started working with redux-form along with react-select. Within my redux-form, there is a child component that contains a element, which in turn renders a react-select component. My goal is to figure out how I can pass a reference to this com ...

Issue with Redux-form's type prop not functioning as expected with checkbox and radio components

Hey there, I'm new to working with redux forms and I've been trying to figure out how to use input types other than "text". I've read through the documentation but for some reason, types like "checkbox" or "radio" are not showing up in the browser output. ...

Guide to retrieving a value from a field and transferring it to a FieldArray value using the Push event in Redux-Form V6-RC3

I am working on a FieldArray component that displays telephone information. Users have the ability to add a telephone object which includes a number field, a type field, and a button to add the phone to the phone list (FieldArray). Within the Phone List c ...

A guide on accessing Textfield input values in Redux-form while utilizing MaterialUI

The objective is to retrieve input values from a material UI component and transmit them to an action creator within a handleSubmit function. <Field name='email' component={email => <TextField fullWidth autoComplete='off' clas ...

The Google Material UI TextField in Redux-Form does not automatically resize to fit multiple lines after being displayed

When my form is loaded hidden, the sizing of my multi-line Google Material UI TextField in react-redux does not adjust properly. To see the behavior in action, click here: https://codesandbox.io/s/redux-form-template-qe06o For a visual reference, check o ...