From 1a9780b7efa0860da200c83cdf621e0fe7258e08 Mon Sep 17 00:00:00 2001 From: Joris W Date: Mon, 9 Jan 2023 01:27:26 +0100 Subject: [PATCH] Simple example: Sync schema, uiSchema and formData (#2507) * 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 Co-authored-by: Heath C <51679588+heath-freenome@users.noreply.github.com> --- packages/playground/src/samples/simple.js | 32 +++++++++++------------ 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/packages/playground/src/samples/simple.js b/packages/playground/src/samples/simple.js index e0901da6c2..16c1c4ebcb 100644 --- a/packages/playground/src/samples/simple.js +++ b/packages/playground/src/samples/simple.js @@ -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", @@ -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", @@ -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", @@ -70,5 +67,6 @@ export default { age: 75, bio: "Roundhouse kicking asses since 1940", password: "noneed", + telephone: "1-800-KICKASS", }, };