Code Monkey home page Code Monkey logo

react-mealby-validation-form's Introduction

Hi there ๐Ÿ‘‹

  • ๐Ÿ”ญ Iโ€™m currently working with Golang, Kotlin and Typescript at @sumup
  • ๐Ÿง™โ€โ™‚๏ธ I'm learning to cast a perfect patronus charm
  • ๐Ÿ‘จโ€๐Ÿš€ I'm looking to travel the galaxy
  • ๐Ÿ“ซ How to reach me: [email protected]

react-mealby-validation-form's People

Contributors

ggwzrd avatar izziaraffaele avatar

Watchers

 avatar

react-mealby-validation-form's Issues

[ListCombo] make options structure more reusable

I believe we should change the interfaces of value and data in the ListCombo component. Right now is to much coupled with the concept of T-shirts of brand and sizes while should be decoupled and more generic.

Suggested approach:

  • Rename data prop to dataSource or source.
  • Each option ( with sub-options ) in the dataSource object should look something like this
{
  label: "Dolce & Gabbana",
  value: "D_G",
  options: [
    { 
      label: "M",
      value: "m"
    },
    {
      label: "L",
      value: "l"
    },
    {
      label: "XXL",
      value: "xxl"
    }
  ]
}
  • Value can be returned as you prefer with one of the following format
"D_G::L"
  {
     primary: "D_G",
     secodart: "L"
  }

["D_G","L"]

[ListCombo] InputField's value is not taken in consideration or updated

ListCombo field must be connected to the form using InputField. Let's suppose the user submits the form after choosing brand and size of the T-shirt, the ListCombo field should contain a value that looks like this ( I suppose )

{
  name: "Obey",
  size: "M"
}

The ListCombo receive default and current values through the prop value and:

  • every time the users changes the brand from ListCombo the value of the form should be updated so that ListCombo will re-render with the new selected brand and will show the available sizes
  • every time the users changes the size from ListCombo the form value should be updated so that ListCombo will re-render with the new selected size
  • if the user selects a brand which doesn't have the previously selected size, the size field should be reset to null.

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.