Skip to content

Commit

Permalink
Simple example: Sync schema, uiSchema and formData (rjsf-team#2507)
Browse files Browse the repository at this point in the history
* Simple example: Sync schema, uiSchema and formData

It makes no sense to have properties commented out in form schema, or to have uiSchema entries for which no schema properties exist. This example was a mess, while it's the first example your first time users will ever see.

* Run Prettier

Co-authored-by: Jimmy Callin <jimmy.callin@gmail.com>
Co-authored-by: Heath C <51679588+heath-freenome@users.noreply.github.com>
  • Loading branch information
3 people authored and shijistar committed Jun 8, 2023
1 parent d85478f commit 1a9780b
Showing 1 changed file with 15 additions and 17 deletions.
32 changes: 15 additions & 17 deletions packages/playground/src/samples/simple.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ export default {
type: "string",
title: "Last name",
},
// age: {
// type: "integer",
// title: "Age",
// },
// bio: {
// type: "string",
// title: "Bio",
// },
// password: {
// type: "string",
// title: "Password",
// minLength: 3,
// },
age: {
type: "integer",
title: "Age",
},
bio: {
type: "string",
title: "Bio",
},
password: {
type: "string",
title: "Password",
minLength: 3,
},
telephone: {
type: "string",
title: "Telephone",
Expand All @@ -47,7 +47,7 @@ export default {
age: {
"ui:widget": "updown",
"ui:title": "Age of person",
"ui:description": "(earthian year)",
"ui:description": "(earth year)",
},
bio: {
"ui:widget": "textarea",
Expand All @@ -56,9 +56,6 @@ export default {
"ui:widget": "password",
"ui:help": "Hint: Make it strong!",
},
date: {
"ui:widget": "alt-datetime",
},
telephone: {
"ui:options": {
inputType: "tel",
Expand All @@ -70,5 +67,6 @@ export default {
age: 75,
bio: "Roundhouse kicking asses since 1940",
password: "noneed",
telephone: "1-800-KICKASS",
},
};

0 comments on commit 1a9780b

Please sign in to comment.