Giter Site home page Giter Site logo

Redux Bad Formatting about card-react HOT 3 OPEN

shatran avatar shatran commented on July 19, 2024
Redux Bad Formatting

from card-react.

Comments (3)

brendonlamb avatar brendonlamb commented on July 19, 2024

@shatran any thoughts on this?

Having the same issue, only happens if my inputs are state controlled... I'm using Semantic UI React in my example (i'm don't think that's related though):

<Input type="text" placeholder="cc number" name="ccNumber" value={ccNumber} onChange={this.handleChange} />

My "handleChange" method simply sets the state of "ccNumber" to the value entered. When formating="true" is set on <CardReactFormContainer /> it appears to wrestle for control of the input.

This appears to only affect "formatted" fields "number" and "expiry"

Edit-
Dumping this.state.ccNumber to my console during render shows the card number updating with each keystroke until i hit a space (from the formatting/mask)... then if i keep pressing the same number it just "deletes" it, however if i press a different number then it starts working again.

Edit x2-
Sorry, working too late... Digging into the code a bit, i'm 99% sure this is something to do with the "Payment" library and how it handles the mask (formatting) on the fields. Reading their docs it looks kinda contrary to the React philosophy regarding updating the dom.

from card-react.

jd4d avatar jd4d commented on July 19, 2024

@brendonlamb Did you come to any conclusions regarding this? I'm actually hitting the same block.

formatting the fields seems convenient and is kind of the reason for using something like this.

from card-react.

brendonlamb avatar brendonlamb commented on July 19, 2024

nope, just kinda moved on :/ sorry.

from card-react.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.