Giter Site home page Giter Site logo

audibene-labs / react-jsonschema-form-layout Goto Github PK

View Code? Open in Web Editor NEW
73.0 5.0 37.0 1.72 MB

Simple Layout Field to offer a variety possibilities to react-jsonschema-forms

Home Page: https://audibene-labs.github.io/react-jsonschema-form-layout/demo/dist/index.html

JavaScript 100.00%
react react-component react-jsonschema-form

react-jsonschema-form-layout's Introduction

react-jsonschema-form-layout

Travis npm package Coveralls

Just a small custom field for the awesome react-jsonschema-form.

see DEMO

Key features:

  • support bootstrap's grid
  • add non-form elements in between
  • ability to control display of elements based on form-state

2017-03-02 14 09 19

Installation

yarn add react-jsonschema-form-layout

Usage:

Make sure you checkout the demo-src and the test-src

const schema = {
  title: 'Todo',
  type: 'object',
  required: ['title'],
  properties: {
    'password': {
      'type': 'string',
      'title': 'Password'
    },
    'lastName': {
      'type': 'string',
      'title': 'Last name'
    },
    'bio': {
      'type': 'string',
      'title': 'Bio'
    },
    'firstName': {
      'type': 'string',
      'title': 'First name'
    },
    'age': {
      'type': 'integer',
      'title': 'Age'
    }
  }
}

const fields = {
  layout: LayoutField
}

const uiSchema = {
  'ui:field': 'layout',
  'ui:layout': [
    {
      firstName: { md: 6 },
      lastName: { md: 6 }
    }, {
      bio: { md: 12 }
    }, {
      age: { md: 6 },
      password: { md: 6 }
    }
  ]
}

react-jsonschema-form-layout's People

Contributors

adamjhamer avatar dependabot[bot] avatar marsch avatar nealeu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

react-jsonschema-form-layout's Issues

Bug react-jsonschema-form-layout is outdated for the new react-jsonschema-form

image

ArrayField.js:614 Uncaught TypeError: Cannot read properties of undefined (reading 'object')
at node_modules/react-jsonschema-form/lib/components/fields/ArrayField.js (ArrayField.js:614:30)
at __require (chunk-AC2VUBZ6.js?v=53f7a059:11:50)
at node_modules/react-jsonschema-form/lib/components/fields/index.js (index.js:7:19)
at __require (chunk-AC2VUBZ6.js?v=53f7a059:11:50)
at node_modules/react-jsonschema-form/lib/utils.js (utils.js:101:11)
at __require (chunk-AC2VUBZ6.js?v=53f7a059:11:50)
at node_modules/react-jsonschema-form/lib/components/fields/ObjectField.js (ObjectField.js:15:14)
at __require (chunk-AC2VUBZ6.js?v=53f7a059:11:50)
at node_modules/react-jsonschema-form-layout/es/index.js (index.js:16:21)
at __require (chunk-AC2VUBZ6.js?v=53f7a059:11:50)

PropType undefined

doShow is undefined prop, using ;

React 15.6.1, "react-jsonschema-form": "^1.0.0",
react-jsonschema-form-layout": "^1.0.4",
"react-bootstrap": "^0.31.5",

Making a form column in one row

Hello can we make a react form in a one row

The form should display data in a grid format, showing the first name and last name in one row, followed by a description in the second row, and personal and work email in one row,

Issue regarding adding condition on embedded fields in an array

Hi,

I need help regarding the implementation of the certain requirement.

Suppose in the json schema I need to add a condition on showing a certain embedded field (username in user object) based upon a certain field (lastname)

Is there any provision for implementing the same?

Schema-

const schema = {
title: 'Tell m',
type: 'object',
required: ['firstName'],
properties: {
'image': {
type: 'string'
},
user: {
type: 'object',
'properties': {
'password': {
'type': 'string',
'title': 'Password'
},
'username': {
'type': 'string'
}
}
},
'lastName': {
'type': 'string',
'title': 'Last name'

}
}

npm audit issues

I am getting these warning in nom audit for this package.

  Moderate        Remote Memory Exposure
  Package         request
  Patched in      >=2.68.0
  Dependency of   react-jsonschema-form-layout
  Path            react-jsonschema-form-layout > codecov.io > request
  More info       https://nodesecurity.io/advisories/309


  Moderate        Regular Expression Denial of Service
  Package         mime
  Patched in      >= 1.4.1 < 2.0.0 || >= 2.0.3
  Dependency of   react-jsonschema-form-layout
  Path            react-jsonschema-form-layout > codecov.io > request >form-data > mime
  More info       https://nodesecurity.io/advisories/535


  Moderate        Regular Expression Denial of Service
  Package         hawk
  Patched in      >=3.1.3 < 4.0.0 || >=4.1.1
  Dependency of   react-jsonschema-form-layout
  Path            react-jsonschema-form-layout > codecov.io > request > hawk
  More info       https://nodesecurity.io/advisories/77


  Moderate        Prototype pollution
  Package         hoek
  Patched in      > 4.2.0 < 5.0.0 || >= 5.0.3
  Dependency of   react-jsonschema-form-layout
  Path            react-jsonschema-form-layout > codecov.io > request > hawk > boom > hoek
  More info       https://nodesecurity.io/advisories/566


  Moderate        Prototype pollution
  Package         hoek
  Patched in      > 4.2.0 < 5.0.0 || >= 5.0.3
  Dependency of   react-jsonschema-form-layout
  Path            react-jsonschema-form-layout > codecov.io > request > hawk > cryptiles > boom > hoek
  More info       https://nodesecurity.io/advisories/566


  Moderate        Prototype pollution
  Package         hoek
  Patched in      > 4.2.0 < 5.0.0 || >= 5.0.3
  Dependency of   react-jsonschema-form-layout
  Path            react-jsonschema-form-layout > codecov.io > request > hawk > hoek
  More info       https://nodesecurity.io/advisories/566


  Moderate        Prototype pollution
  Package         hoek
  Patched in      > 4.2.0 < 5.0.0 || >= 5.0.3
  Dependency of   react-jsonschema-form-layout
  Path            react-jsonschema-form-layout > codecov.io > request > hawk > sntp > hoek
  More info       https://nodesecurity.io/advisories/566


  Moderate        Prototype pollution
  Package         hoek
  Patched in      > 4.2.0 < 5.0.0 || >= 5.0.3
  Dependency of   react-jsonschema-form-layout
  Path            react-jsonschema-form-layout > coveralls > request > hawk > boom > hoek
  More info       https://nodesecurity.io/advisories/566


  Moderate        Prototype pollution
  Package         hoek
  Patched in      > 4.2.0 < 5.0.0 || >= 5.0.3
  Dependency of   react-jsonschema-form-layout
  Path            react-jsonschema-form-layout > coveralls > request > hawk > cryptiles > boom > hoek
  More info       https://nodesecurity.io/advisories/566


  Moderate        Prototype pollution
  Package         hoek
  Patched in      > 4.2.0 < 5.0.0 || >= 5.0.3
  Dependency of   react-jsonschema-form-layout
  Path            react-jsonschema-form-layout > coveralls > request > hawk >hoek
  More info       https://nodesecurity.io/advisories/566


  Moderate        Memory Exposure
  Package         tunnel-agent
  Patched in      >=0.6.0
  Dependency of   react-jsonschema-form-layout
  Path            react-jsonschema-form-layout > codecov.io > request >  tunnel-agent
  More info       https://nodesecurity.io/advisories/598


  Moderate        Memory Exposure
  Package         tunnel-agent
  Patched in      >=0.6.0
  Dependency of   react-jsonschema-form-layout
  Path            react-jsonschema-form-layout > coveralls > request > tunnel-agent
  More info       https://nodesecurity.io/advisories/598

Maybe you need to update the dependencies.

Thanks,

Proptypes are not defined when running on react v16.x

I believe Proptypes have been moved out of react and into its own package in v16, it had a warning since 15.6 so its a good time to include it?. This now crashing the application when your on the latest version of react, could be a simple fix to just add them?

I'm running react-create-app with the latest version of react and webpack.

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.