Code Monkey home page Code Monkey logo

Comments (7)

apfelfabrik avatar apfelfabrik commented on May 15, 2024 1

@ondrejbartas The example you posted above works because arrayOf renders a JSON editor without respecting the contained propType. Using PropTypes.shape as a first level prop consistently fails with the error @40818419 reported and I'm experiencing.

from react-bluekit.

ondrejbartas avatar ondrejbartas commented on May 15, 2024

Hi, this is strange. PropType.shape should be working. We have some examples whit it.

https://github.com/blueberryapps/react-bluekit/blob/master/example_components/MultiField.react.js#L13-L17

can you send your propTypes pls?

from react-bluekit.

40818419 avatar 40818419 commented on May 15, 2024

Ah... i have it like this:

...
options: PropTypes.shape({
  fontFamily: PropTypes.string,
  borderRadius: PropTypes.string,
  border: PropTypes.string,
  boxShadow: PropTypes.string,
  margin: PropTypes.string,
  paddingLeft: PropTypes.string,
  width: PropTypes.string,
  height: PropTypes.string,
  fontSize: PropTypes.string,
  backgroundColor: PropTypes.string,
  color: PropTypes.string,
}),
 ...

from react-bluekit.

ondrejbartas avatar ondrejbartas commented on May 15, 2024

It should be working.

from react-bluekit.

apfelfabrik avatar apfelfabrik commented on May 15, 2024

Found this issue when running in a very similar problem: Uncaught TypeError: data.getIn is not a function related to a component using PropTypes.shape. This is on 0.4.1.

from react-bluekit.

apfelfabrik avatar apfelfabrik commented on May 15, 2024

PR might illustrate the problem, not sure this restores the intended behaviour though.

from react-bluekit.

imtoo avatar imtoo commented on May 15, 2024

It seems it solved the problem. Thanks guys!

from react-bluekit.

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.