Giter Club home page Giter Club logo

Comments (10)

ryanblakeley avatar ryanblakeley commented on August 20, 2024

I'm not seeing this issue in the example or in my app where I use this component with custom colors. Could you confirm whether or not it shows up when you run the example?

Just for reference, the three props that control underline color are:

  • validationColor
  • underlineStyle
  • underlineFocusStyle

... seen here.

from formsy-material-ui.

cristianocca avatar cristianocca commented on August 20, 2024

The example seems to use material-ui 0.16 and formsy-material-ui 0.5, after upgrading to 0.6.2 it was already enough to reproduce the issue, below is the screenshot from the example code after upgrading the library.

capture

Also, I'm not using any of the custom underline or validation color properties, the colors are supposed to be defined by w/e value was set on the material ui theme configuration.

from formsy-material-ui.

ryanblakeley avatar ryanblakeley commented on August 20, 2024

Ok, thanks for pointing that out. I will have a look tomorrow.

from formsy-material-ui.

heliokroger avatar heliokroger commented on August 20, 2024

Something new?

from formsy-material-ui.

ryanblakeley avatar ryanblakeley commented on August 20, 2024

@cristianocca would you please share how you're doing the material ui theme config?

from formsy-material-ui.

cristianocca avatar cristianocca commented on August 20, 2024

@rojobuffalo I'm not doing anything special, for the example code I didn't modify anything at all, simply updated the dependency and ran it and the issue was there.

Here's an example of actual code I use, maybe it helps.

conf.muiTheme = getMuiTheme({
  appBar: {
    color: '#f3f3f3',
    textColor: "rgba(0, 0, 0, 0.87)"
  },
  palette: {
    primary1Color: "rgb(35,122,186)",    
    primary2Color: "rgb(35,122,186)",    
    accent1Color: '#333',                
    pickerHeaderColor: 'rgb(35,122,186)'
  },
  card:{
    header:  {
      padding:"10px",
      backgroundColor:'#fafafa',
      borderBottom:'1px solid #C2C2C2'
    }
  },
  menuItem: {
    selectedTextColor: 'rgb(35,122,186)'
  },
  drawer: {
    color: '#333',
    textColor: '#c0bbb7',
    listItemFontSize: "12px",
    selectedListItemColor: 'rgba(69,69,69,.6)',
    selectedListItemTextColor: '#fff'
  },
  dialog:{
    bodyFontSize: "15px",
    bodyColor: 'rgba(0, 0, 0, 0.87)'
  }
});

<MuiThemeProvider muiTheme={conf.muiTheme}>
    ... main components...
</MuiThemeProvider>

// sample input
<FormsyText
    autoComplete="off"
    type="text"
    name="email"
    required
    hintText="Email"
    updateImmediately
    floatingLabelText="Email"
    value=""
    fullWidth={false}
/>

from formsy-material-ui.

ryanblakeley avatar ryanblakeley commented on August 20, 2024

I think I found the fix. The older createClass React API, which FormsyText uses, should have a method getDefaultProps instead of a static property defaultProps as an object. Please try installing from the HEAD of the master branch and confirm if that fixes it for you.

from formsy-material-ui.

cristianocca avatar cristianocca commented on August 20, 2024

I can't seem to make it work when installing directly from git (npm install git+https://github.com/rojobuffalo/formsy-material-ui) do I need an additional compile step?

from formsy-material-ui.

andrewstoneameritech avatar andrewstoneameritech commented on August 20, 2024

"formsy-material-ui": "^0.6.0", "formsy-react": "^0.19.5",

Also suffering from this problem. It's making this unusable :(

from formsy-material-ui.

ryanblakeley avatar ryanblakeley commented on August 20, 2024

Just published v0.6.3 that fixes this.

from formsy-material-ui.

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.