From 526e06f23bf40eadcb5ffa60c5f127baeb42f0ab Mon Sep 17 00:00:00 2001 From: Nicolas Perriault Date: Sat, 9 Jan 2016 17:48:05 +0100 Subject: [PATCH] Renamed uiSchema widget to ui:widget to avoid name collisions. --- README.md | 6 +++--- playground/samples/nested.js | 2 +- playground/samples/numbers.js | 6 +++--- playground/samples/ordering.js | 6 +++--- playground/samples/simple.js | 6 +++--- playground/samples/widgets.js | 6 +++--- src/components/fields/BooleanField.js | 2 +- src/components/fields/StringField.js | 2 +- test/index_test.js | 20 ++++++++++---------- 9 files changed, 28 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 1fa83157fd..fc136556bb 100644 --- a/README.md +++ b/README.md @@ -75,14 +75,14 @@ That should give something like this (if you use the default stylesheet): ### Alternative widgets -JSONSchema is limited for describing how a given data type should be rendered as an input component, that's why this lib introduces the concept of *UI schema*. A UI schema is basically an object literal describing which UI widget should be used to render a certain field. +JSONSchema is limited for describing how a given data type should be rendered as an input component, that's why this lib introduces the concept of *UI schema*. A UI schema is basically an object literal describing how the form should be rendered, eg. which UI widget should be used to render a certain field thanks to the `ui:widget` property: Example: ```jsx const uiSchema =  { done: { - widget: "radio" // could also be "select" + "ui:widget": "radio" // could also be "select" } }; @@ -176,7 +176,7 @@ const schema = { }; const uiSchema = { - widget: (props) => { + "ui:widget": (props) => { return ( { }; const uiSchema = { - widget: (props) => { + "ui:widget": (props) => { return ( { describe("textarea", () => { const uiSchema = { foo: { - widget: "textarea" + "ui:widget": "textarea" } }; @@ -673,7 +673,7 @@ describe("Form", () => { describe("password", () => { const uiSchema = { foo: { - widget: "password" + "ui:widget": "password" } }; @@ -721,7 +721,7 @@ describe("Form", () => { describe("radio", () => { const uiSchema = { foo: { - widget: "radio" + "ui:widget": "radio" } }; @@ -768,7 +768,7 @@ describe("Form", () => { describe("updown", () => { const uiSchema = { foo: { - widget: "updown" + "ui:widget": "updown" } }; @@ -804,7 +804,7 @@ describe("Form", () => { describe("range", () => { const uiSchema = { foo: { - widget: "range" + "ui:widget": "range" } }; @@ -851,7 +851,7 @@ describe("Form", () => { describe("updown", () => { const uiSchema = { foo: { - widget: "updown" + "ui:widget": "updown" } }; @@ -887,7 +887,7 @@ describe("Form", () => { describe("range", () => { const uiSchema = { foo: { - widget: "range" + "ui:widget": "range" } }; @@ -934,7 +934,7 @@ describe("Form", () => { describe("radio", () => { const uiSchema = { foo: { - widget: "radio" + "ui:widget": "radio" } }; @@ -996,7 +996,7 @@ describe("Form", () => { describe("select", () => { const uiSchema = { foo: { - widget: "select" + "ui:widget": "select" } };