Giter Club home page Giter Club logo

react-advanced-form-addons's Introduction

React Advanced Form Addons

A collection of tools dedicated for fast form prototyping using React Advanced Form.

Components

Fields

  • Input
  • Radio
  • Checkbox
  • Select
  • Textarea

Other

  • Label
  • Button

Getting started

Install

NPM:

npm install react-advanced-form-addons --save

Yarn:

yarn install react-advanced-form-addons

Note: You would need to have react-advanced-form installed as a peer dependency in order to use this package.

Prototype!

import React from 'react';
import { Form } from 'react-advanced-form';
import { Input, Select } from 'react-advanced-form-addons';

export default class Example extends React.Component {
  render() {
    return (
      <Form>
        <Input
          name="username"
          required />
        <Select
          name="role"
          required>
          <option value="admin">Administrator</option>
          <option value="editor">Editor</option>
        </Select>
      </Form>
    );
  }
}

License

This project is issued under MIT License.

react-advanced-form-addons's People

Contributors

kettanaito avatar

Stargazers

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

Watchers

 avatar  avatar

react-advanced-form-addons's Issues

Textarea is not working

The Field Textarea is not working properly.
The code:
import { Input, Button, Select, Textarea } from 'react-advanced-form-addons';
<Col lg={4}>
<Input name="name" type="text" label="Nombre" required />
</Col>
<Col lg={4}>
<Textarea name="description" label="Descripcion" required />
</Col>

The result:
Screen Shot 2019-06-07 at 9 55 40 AM

fix warning : 'Received `false` for a non-boolean attribute `display`' on ValidationStatus of Input component

Thx for the amazing job ๐Ÿ‘

Yet I had issues when trying to use the lib. The basic Input Component works well but display an important warning : Received 'false' for a non-boolean attribute 'display'.

To avoid it I simply replaced display={ valid || invalid } on line 128 of Input.jsx by : display='flex'

I also encountered similar issues with <Field.Group> which totally block the render of storybook.

Inject custom css style to Input component

I am trying to build a registration Form using Input component from react-advanced-form-addons.

Can able to build fundamental registration page with all the required validation.

But finally stuck with Injecting custom css/style to Input component (bold and font color), since it involve styled component which create style dynamically, unable to set my own style in the production mode, ie NODE_ENV='production', ex. display:block, but which works fine in NODE_ENV='development'.

And also since it generates

tag for validation error, don't have freedom to set/apply my won style.

Please let me know how to add custom css/styles to or

components.

If there is no solution I have move to other solution. help me out to resolve the issue.

checkbox checked

Setting the checked attribute for checkbox works for initial state but attempting to alter it during the form for example with a select all checkbox that selects all the boxes and disables them (and vice versa for unchecking the box) won't comply unless using .click() on each element. Is there some way to customize the element to enable setting checked= from the props this from happening?

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.