Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Ernani Joppert Pontes Martins
    @ernani
    Every form component decorated with redux-form has in this.props a dispatch() function, you can dispatch action creators such as change, reset, etc.
    you will need to import change, reset, etc from redux-form to dispatch them
    Ka Tam
    @kktam
    @ernani do you have any code samples (urls)?
    Ka Tam
    @kktam
    @ernani I tried (https://redux-form.com/7.0.4/docs/api/formvalues.md/) and cannot get this to work. Do you have some code samples getting neighbouring form values (not parent forms)?
    Ernani Joppert Pontes Martins
    @ernani
    @kktam download the sample for this in github, if it does not work file for an issue. I have no simple working example to share, but, here, it works fine. Make sure you are passing props to child components if you do have them.
    Iain Freestone
    @iainfreestone
    Hi, I am using reducer.plugin() to handle various custom actions. Up to recently this was working fine but now the only actions that this seems to receive is the @@redux-form actions. I can see my custom actions in my Redux Chrome dev tools but the reducer.plugin() is no longer handling them
    has something changed in a recent update?
    Iain Freestone
    @iainfreestone
    I think it was this erikras/redux-form@a82ebb5
    Emmanuel Villegas
    @Ragnarok99
    hi, is someone here? :)
    Emmanuel Villegas
    @Ragnarok99

    i'm stucked getting the values from my seletedFields components in the submit method, they just doesn´t appear there, can somebody please provide me some sample for do this?

    thanks,

    PD: i'm using material ui redux-form

    Shawn Mclean
    @shawnmclean
    Am I free to add my own objects to form redux state (once it does not conflict with another form name) or will redux-form do some kind of cleanup, or similar on objects in that state?
    Marshall Ford
    @marshallford
    Hello! How would I keep the submitted value different than the value shown the user in the input field?
    Sachin Kumar
    @sachin9891

    hey everyone need a little help if anybody can help that would be great

    I am implementing redux form
    I want to store fieldValue to my custom reducer state by using onChange function but its not getting last digit

    I am using formValueSelector to get formValues

    my code structure is this

    <Field name="mobile" type="number" component={renderInputField} onChange={this.saveInputValue.bind(this,formValues.mobile)} label="Enter mobile Number" validate={[ fromValidationFunctions.required, ]} />

    saveInputValue is function I am using to store values in reducer
    Drew R
    @drew-r
    Hey guys
    just a heads up
    redux-form.com docs menu links are 404ing for me
    Adding a trailing slash to the href fixes
    Tyler Kellogg
    @recurrence
    Can someone point me to a TypeScript example with FieldArray? Having trouble getting the types to line up :)
    stunaz
    @stunaz
    Can someone point me to a fully Typed Typescript example?
    Patrick P. Henley
    @ab18556
    When I use a normalizer on a field like in the doc: https://redux-form.com/7.2.0/examples/normalizing/ if the result of the normalizer dont change, like when i am expecting numbers but i type characters, the field wont re-render. Any Idea about what might be causing it?
    Rhys van der Waerden
    @rhys-vdw
    Heya. Anybody know if it's possible to set the form name dynamically based on props?
    For example I would like to do something like this:
    export default reduxForm({
      name: (ownProps) => `foo-${ownProps.foo.id}`
    })(Foo)
    Piotr Godek
    @iampeter
    Hi guys, I wonder if anyone knows what's the timeline for the next release
    Pasi Hirvonen
    @pasih
    shouldn't redux-form render 'error' (invalid) state for fields that fail async validation? I get invalid: true if I use a synchronous validator on the field, but if I validate the whole form with asyncValidate, I don't seem to get an error state show up
    gakuakachi
    @gakuakachi

    Hello guys, I wonder if anyone have some idea to update File object data to redux form state via Change action creator?
    According to docs, value for payload would accept any.

    current behavior: can not update redux-formstate with File object via Change action creator, and payload is empty.
    expected behavior: can update redux-formstate with File object via Change action creator

    https://redux-form.com/7.0.0/docs/api/props.md/#-code-change-field-string-value-any-function-code-

    version: 7.0.4

    Pasi Hirvonen
    @pasih
    to answer my own question, you need the errors in an object, instead of having keys like "user.username" etc.
    Iain Freestone
    @iainfreestone
    Hi all, I am in the early stages of designing my first JS app. One of my main requirements is that when Customer 1 logs in they get access to Component X and Y, and when Customer 2 logs in they get access to Component A and Component B. Customer 1 will never have access visually or by digging into the code Customers 2 components due to IP/Copyright restrictions. I have been reading about Lazy loading and Webpack is this what I would use to restrict access to a particular customer?
    hopefully that make sense
    Rhys van der Waerden
    @rhys-vdw
    @iainfreestone This is not the correct room for that question. Perhaps try the webpack room?
    Iain Freestone
    @iainfreestone
    ops sorry i thought I had clicked on webpack convo thanks
    Rhys van der Waerden
    @rhys-vdw
    :ok_hand:
    Iain Freestone
    @iainfreestone
    although thinking about it i do have a redux-form question!

    I am trying to use redux-form reducer.plugin() with dynamically generated form names but am running in to problems as the reducer plugin requires the name of the form and I may not know that before execution.

    In the case below it works fine if I know my form is called foo but in my app I have multiple forms dynamically named such as CalcForm1, CalcForm2 .... CalcFormN etc. which all require the functionality of the "CALCULATE" action.type

    Is there a why I can use this with dynamically named forms.

    export const formPlugin = {
      foo: (state = {}, action) => { // <----- 'foo' is name of form given to     reduxForm()
        switch (action.type) {
          case "CALCULATE":
            return {
              ...state,
              values: doCalculate(action.payload.expressions, state.values)
            };
    
          default:
            return state;
        }
      }
    };
    Rhys van der Waerden
    @rhys-vdw
    @iainfreestone it doesn't look like there's an easy way...
    Rhys van der Waerden
    @rhys-vdw
    @iainfreestone (I wrote some other stuff but deleted it because it was wrong)
    Iain Freestone
    @iainfreestone
    @rhys-vdw ok thanks, yeah does not seem an easy way. Thanks for replying
    Rhys van der Waerden
    @rhys-vdw
    Oh @iainfreestone maybe I was right actually... I think you can set form as an argument to meta... see source... Perhaps try it out.
    Iain Freestone
    @iainfreestone
    Thanks @rhys-vdw i think you only have access to meta in the action i.e. action.meta.form so would still be reliant on knowing the forms name
    Iain Freestone
    @iainfreestone
    Maybe there is another way of achieving this, what I need to happen is that when a button on the form is pressed it goes off and completes a calculation and updates the values in the form
    Hafiz Khairudin
    @hafizio
    Hello, I'm quite new to redux-form. Thanks for the library!
    I'm wondering if there's an action creator to reset the syncErrors?
    I've tried untouch, unregister, clearFields, and etc
    but all of them can't seem to clear the syncErrors state
    Carwyn Stephen
    @huwcarwyn

    Hello everyone, I was wondering what is the best practice for initializing a field when it is dynamically added to a form? I have a 'list input' field which is basically an array of text inputs, and I want to initialize this input with two blank inputs with placeholder text in each.

    At the moment I'm passing an array of placeholder values into the field, and calling onChange when the component mounts to create some empty values in the field, which renders the placeholder. However this is having unintended side effects due to calling the change action, and I'm doing some stuff with redux-form's onChange that depends on values and previousValues

    Sean
    @arist0tl3
    Hey all, new to redux-form and trying to figure out the best way to do an async normalize/format function on a field. I'm taking in a google maps placeID, and want to call a lookup on it and store the result as the value of another field.
    Maël Lavault
    @moimael
    Did anyone managed to integrate downshift with redux-form ? Any tip would be much appreciated :)
    Patrick P. Henley
    @ab18556
    Hey guys, I tryied a couple of form validation library with redux-form and none seems to fit. I need one with custom error messages that would allow me to do conditional validation. Anyone know some cool validation library that works well with redux-form?
    Tom
    @traverse
    it's quite easy to write your own validation