1.0.8 • Published 4 years ago

react-jsonschema-form-extensions v1.0.8

Weekly downloads
79
License
MIT
Repository
github
Last release
4 years ago

react-jsonschema-form-extensions

Travis npm package Coveralls

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

This is a fork of audibene-labs/react-jsonschema-form-layout, for support bootstrap grid system completely.

see DEMO

Key features:

  • support bootstrap's grid
  • add non-form elements in between

2017-03-02 14 09 19

Installation

npm install react-jsonschema-form-extensions

Usage:

Make sure you checkout the demo-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_grid: LayoutGridField
}

const uiSchema = {
  'ui:field': 'layout_grid',
  'ui:layout_grid': { 'ui:row': [
    { 'ui:col': { md: 12, children: [
      { 'ui:group': 'Name', 'ui:row': [
        { 'ui:col': { md: 6, children: ['firstName'] } },
        { 'ui:col': { md: 6, children: ['lastName'] } },
      ] },
      { 'ui:row': [
        { 'ui:col': { md: 6, children: ['password'] } },
        { 'ui:col': { md: 6, children: ['age'] } },
      ] },
      { 'ui:row': [
        { 'ui:col': { md: 12, children: ['bio'] } },
      ] },
    ] } },
  ] },
}
1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago