GithubHelp home page GithubHelp logo

nikordaris / redux-form-jsonschema-reactstrap Goto Github PK

View Code? Open in Web Editor NEW
19.0 2.0 2.0 1.91 MB

redux-form field library using reactstrap

License: MIT License

JavaScript 100.00%
react redux redux-form jsonschema reactstrap

redux-form-jsonschema-reactstrap's Introduction

Redux-Form Jsonschema Reactstrap

A collection of reactstrap form components for redux-form. These components are intended to be used with react-jsonschema-vis to generate redux-form forms from a jsonschema definitions

Build Status codecov

Install

$ npm install redux-form-jsonschema-reactstrap

with react-jsonschema-vis

Example

Demo

redux-form-jsonschema-reactstrap's People

Contributors

nikordaris avatar

Stargazers

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

Watchers

 avatar  avatar

redux-form-jsonschema-reactstrap's Issues

Array Components

  • Dynamic input fields with add and remove buttons
  • Dynamic object form with add and remove buttons
  • Dynamic modal object form with list group display, add/remove buttons, modal edit, and es6-template-strings display names

Unexpected Field Validation behaviour (different from storybook demo)

I'm having difficulty replicating the behaviour of the 'simple form' demo provided.

I have created a codesandbox here : https://codesandbox.io/s/qkxmyyvokq

The sandbox behaves slightly differently from what happens on my desktop. In the sandbox if an inputs valid prop is false there is no change to the inputs border or the green tick in the corner. On my desktop the border goes gray and the green tick disappears. In the demo the border goes red, the green tick disappears and a message like 'missing required field' appears below the input.

How do I get this behaviour to work outside of the storybook?

The 'App.js' code is also below:

import React, { Component } from "react";
import SchemaVis from "react-jsonschema-vis";
import components from "redux-form-jsonschema-reactstrap";
import { Provider } from "react-redux";
import { createStore, combineReducers } from "redux";
import { reducer as formReducer } from "redux-form";

import simpleFormSchema from "./schema.json";
import { ReduxTestForm } from "./TestForm";

const rootReducer = combineReducers({
  // ...your other reducers here
  // you have to pass formReducer under 'form' key,
  // for custom keys look up the docs for 'getFormState'
  form: formReducer
});

const store = createStore(rootReducer);

class App extends Component {
  render() {
    return (
      <Provider store={store}>
        <ReduxTestForm
          form="simple form"
          //onSubmit={data => action('Form(SimpleForm) submit')(data)}
        >
          <SchemaVis
            form="simple form"
            schema={simpleFormSchema}
            components={components}
          />
        </ReduxTestForm>
      </Provider>
    );
  }
}

export default App;

Dropdown selected values are not tracked when submitting form.

Dropdown values are not being tracked when hitting the submit button.
This can be confirmed on the storybook simple form example selecting any gender option value and filling in other form required fields. Dropdown values for gender are not coming out in the log.

The same happens when trying with custom code.
Is it probably something else missing to make the form grab the correct values in data?

Can this library be used without react-jsonschema-vis

I think this is what I'm looking for. I'm having difficulties wrapping reactstrap with redux-form or vice versa to get the styles from reactstrap to work with redux-form.

My question: If I don't want to predefine my schema, but still want to use this libarary, is that possible? If so, how? If not, I'm still not sure how to use it... any plans on building out the docs?

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.